ocadotechnology/rapid-router

View on GitHub
.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
name: CI
on:
  release:
    types: [published]
  pull_request:
jobs:
  tests:
    name: Run tests
    runs-on: ubuntu-20.04
    env:
      LANG: C.UTF-8
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.8"
          architecture: "x64"
      - name: Install pip requirements
        run: |
          pip install pipenv==2022.10.4
          pip install pytest-cov
          pipenv install --dev --system
      - name: Collect static
        run: python example_project/manage.py collectstatic --noinput
      - name: Run Python tests
        run: pytest -x --cov=. --cov-report=xml -vv -n auto
        env:
          SELENIUM_WEBDRIVER: chrome-headless
          SELENIUM_HEADLESS: True
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v3