Add tests before push
This commit is contained in:
parent
7f2bfa47b1
commit
40308af174
1 changed files with 19 additions and 0 deletions
19
.github/workflows/publish.yaml
vendored
19
.github/workflows/publish.yaml
vendored
|
@ -6,9 +6,28 @@ on:
|
|||
- master
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: Python tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Setup poetry
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
poetry-version: 1.1.13
|
||||
- name: Install dependencies
|
||||
run: poetry install
|
||||
- name: Test
|
||||
run: pytest --cov=. --cov-branch --cov-report term-missing:skip-covered
|
||||
working-directory: ./src/
|
||||
push_to_registry:
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
needs: [tests]
|
||||
steps:
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
|
|
Reference in a new issue