chore(deps): bump codecov/codecov-action from 4.5.0 to 5.0.7 #81
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: Pull Request checks | |
on: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
run-tests: | |
name: Run pytest tests | |
runs-on: ubuntu-latest | |
env: | |
POSTGRES_USER: folksonomy | |
POSTGRES_PASSWORD: folksonomy | |
# important: "localhost" does not work on github ci, only 127.0.0.1 | |
POSTGRES_HOST: "127.0.0.1" | |
POSTGRES_DATABASE: folksonomy | |
steps: | |
- name: checkout project | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: start a postgresql docker container | |
run: ./start_postgres.sh & | |
- name: install python | |
uses: actions/[email protected] | |
with: | |
python-version: '3.8' | |
cache: 'pip' | |
- name: install packages in a virtual environment | |
run: | | |
python -m venv .venv && \ | |
.venv/bin/pip install -r requirements.txt | |
- name: wait postgres to be ready | |
timeout-minutes: 10 | |
run: | | |
while ! (nc -vz 127.0.0.1 5432);do echo "waiting postgres"; sleep 1;done | |
- name: initialize database | |
run: | | |
.venv/bin/python db-migration.py | |
- name: run tests | |
# use PYTHONASYNCIODEBUG to ensure all asyncio tasks are closed | |
run: | | |
PYTHONASYNCIODEBUG=1 .venv/bin/pytest -v --cov=folksonomy --cov-report xml tests/ folksonomy/ | |
- uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true |