Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Oct 31, 2023
1 parent b8ff0f2 commit 742f4de
Showing 1 changed file with 2 additions and 83 deletions.
85 changes: 2 additions & 83 deletions .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ jobs:
fail-fast: false # don't stop on first failure
matrix:
os: ['ubuntu-latest']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
include:
- os: 'macos-latest'
python-version: '3.7'
python-version: ['3.10']
env:
PYTEST_ADDOPTS: --cov --cov-append -n 5 --color=yes
PYTEST_ADDOPTS: --cov --cov-append -n 5 --color=yes -q -l
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -58,85 +55,7 @@ jobs:
run: |
pytest tests/integration
- name: Upload failed tests artifact
if: failure()
uses: actions/upload-artifact@v3
with:
name: cylc-run (${{ matrix.os }} py-${{ matrix.python-version }})
path: ~/cylc-run/

- name: Coverage report
run: |
coverage xml
coverage report
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage_${{ matrix.os }}_py-${{ matrix.python-version }}
path: coverage.xml
retention-days: 7

lint:
runs-on: 'ubuntu-latest'
timeout-minutes: 10
steps:
- name: Apt-Get Install
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
- name: Checkout
uses: actions/checkout@v4

# note: exclude python 3.10+ from mypy checks as these produce false
# positives in installed libraries for python 3.7
- name: Configure Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install
run: |
pip install -e ."[tests]"
- name: Flake8
run: flake8

- name: Bandit
run: |
bandit -r --ini .bandit cylc/flow
- name: Shellchecker
run: etc/bin/shellchecker

- name: MyPy
run: mypy

- name: Towncrier
run: towncrier build --draft

- name: Linkcheck
run: pytest -m linkcheck --dist=load --color=yes -n 10 tests/unit/test_links.py

codecov:
needs: test
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download coverage artifacts
uses: actions/download-artifact@v3

- name: Codecov upload
uses: codecov/codecov-action@v3
with:
name: ${{ github.workflow }}
flags: fast-tests
fail_ci_if_error: true
verbose: true
# Token not required for public repos, but avoids upload failure due
# to rate-limiting (but not for PRs opened from forks)
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 742f4de

Please sign in to comment.