fix: PT59628-1312-R4632 #3081
Workflow file for this run
This file contains hidden or 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: CI | |
on: | |
release: | |
types: [published] | |
pull_request: | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-22.04 | |
env: | |
LANG: C.UTF-8 | |
COVERAGE_REPORT: coverage.xml # NOTE: COVERAGE_FILE is reserved - do not use. | |
OCADO_TECH_ORG_ID: 2088731 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
architecture: "x64" | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Install dependencies | |
run: | | |
pip install pipenv | |
pipenv install --dev --system | |
yarn --frozen-lockfile | |
- name: Collect static | |
run: python manage.py collectstatic --noinput --settings example_project.portal_test_settings | |
- name: Run Python tests | |
run: pytest -x --cov=. --cov-report=xml -vv -n auto | |
env: | |
SELENIUM_WEBDRIVER: firefox-headless | |
SELENIUM_HEADLESS: True | |
- name: Run Cypress tests | |
uses: cypress-io/github-action@v5 | |
with: | |
browser: chrome | |
install: false | |
start: bash ./run_testserver | |
wait-on: http://localhost:8000 | |
wait-on-timeout: 300 | |
record: true | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload coverage to Codecov | |
if: github.repository_owner_id == env.OCADO_TECH_ORG_ID | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ${{ env.COVERAGE_REPORT }} |