Merge branch 'master' into upgrade/django-42 #798
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 Squire | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Test Code | |
runs-on: ${{ matrix.ubuntu }} | |
env: | |
DJANGO_ENV: "TESTING" | |
strategy: | |
matrix: | |
python: ["3.10"] | |
ubuntu: ["ubuntu-22.04"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Cache dependencies # caching dependency will make our build faster. | |
uses: actions/cache@v3 # for more info checkout pip section documentation at https://github.com/actions/cache | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements/*.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Setup Python Environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python }}" | |
- name: Install requirements | |
run: pip install -r requirements/ci.txt | |
- name: Run Tests | |
run: coverage run manage.py test | |
- name: Output Coverage | |
run: coverage report && coverage xml | |
- name: Upload coverage to CodeCov | |
uses: codecov/codecov-action@v4 # https://github.com/codecov/codecov-action | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: OS,PYTHON | |
fail_ci_if_error: true | |
files: ./coverage/coverage.xml | |
flags: unittests |