Run Tests #1444
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: Run Tests | |
on: | |
push: | |
branches: | |
- '**' | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '30 13 * * 1-5' | |
# Add cron job to ensure external webpages + apis have no changed | |
jobs: | |
run_tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8] | |
poetry-version: [1.1.7] | |
os: [ubuntu-20.04] | |
runs-on: ${{ matrix.os }} | |
name: coverage | |
env: | |
PYTHON: ${{ matrix.python-version }} | |
OS: ${{ matrix.os }} | |
POETRY: ${{ matrix.poetry-version}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run image | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install Dependencies | |
run: poetry install | |
- name: Coverage Report | |
run: poetry run python -m pytest --cov=./ --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
if: always() | |
with: | |
file: ./coverage.xml | |
flags: ga_ci | |
env_vars: PYTHON,OS,POETRY | |
fail_ci_if_error: true | |