Fix GitHub Actions and update Changelog (#148) #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pytest | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
coverage: | |
timeout-minutes: 10 | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Start containers | |
run: docker compose -f "local-dev/docker-compose.yml" up -d --build | |
- name: Build dev environment | |
run: docker exec cicada_dev make dev | |
- name: Run tests | |
run: docker exec cicada_dev make pytest | |
- name: Build coverage file | |
run: docker exec cicada_dev /bin/bash -c "source /opt/cicada/venv/bin/activate; pytest --cache-clear --cov=cicada --cov-fail-under=70" > pytest-coverage.txt | |
- name: Comment coverage | |
uses: coroo/[email protected] | |
- name: Stop containers | |
if: always() | |
run: docker compose -f "local-dev/docker-compose.yml" down |