Add tests before push

This commit is contained in:
Gabriel Augendre 2022-09-28 01:57:19 +02:00
parent 7f2bfa47b1
commit 40308af174

View file

@ -6,9 +6,28 @@ on:
- master - master
jobs: 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: push_to_registry:
name: Push Docker image to Docker Hub name: Push Docker image to Docker Hub
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [tests]
steps: steps:
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2