use poetry in ci

This commit is contained in:
Florian Bezannier
2022-03-27 21:18:16 +02:00
parent 7bc6024ab3
commit 834a7e0a38
+10 -3
View File
@@ -18,7 +18,7 @@ jobs:
# This workflow contains a single job called "build"
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
runs-on: debian-buster
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
@@ -26,12 +26,19 @@ jobs:
- uses: actions/checkout@v2
# Runs a set of commands using the runners shell
- name: Install requirements
run: pip install -r requirements.txt -r requirements-dev.txt
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
export PATH="${PATH}:${HOME}/.poetry/bin/"
poetry install
- name: check quality
run: |
export PATH="${PATH}:${HOME}/.poetry/bin/"
poetry run prospector
- name: test app
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
echo Test
prospector
source {path_to_venv}/bin/activate
coverage run -m unittest || exit 1
[ -n "$CODACY_PROJECT_TOKEN" ] && coverage combine && coverage xml -o cobertura.xml && bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml