Fixes #187 - fixed the error that was occurring when trying to upload… #223
Workflow file for this run
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: Test API workflow | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Test python API | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up uWSGI dependencies | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: gcc python3-dev build-essential libpcre3 libpcre3-dev | |
version: 1.0 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
# Semantic version range syntax or exact version of a Python version | |
python-version: '3.10' | |
# Optional - x64 or x86 architecture, defaults to x64 | |
architecture: 'x64' | |
# You can test your matrix by printing the current Python version | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install requirements | |
working-directory: ./backend | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install -r requirements.txt | |
- name: Run tests and collect coverage | |
working-directory: ./backend | |
run: pytest --cov=./ --cov-report=xml | |
- name: Upload coverage reports to Codecov with GitHub Action | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |