Skip to content

Commit

Permalink
add step names & tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
dugalh committed Jan 27, 2024
1 parent 725c7a5 commit a70e736
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/run-unit-tests_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Tests

on:
push:
branches: [main, feature_pytest_click]
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 2 * * 1'
- cron: '0 2 * * 1' # run weekly

jobs:
test:
Expand All @@ -16,30 +17,37 @@ jobs:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ macos-latest, ubuntu-latest, windows-latest ]

steps:
- uses: actions/checkout@v4
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
# TODO: list dependencies and test dependencies in one place
# TODO: list dependencies and test dependencies in one place and refer to that from here
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov
python -m pip install rasterio opencv-python-headless click tqdm pyyaml fsspec requests aiohttp
python -m pip list
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
timeout-minutes: 5
run: |
python -m pytest --cov=orthority --cov-report=term-missing --cov-report=xml:coverage.xml ./tests
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
Expand Down

0 comments on commit a70e736

Please sign in to comment.