Skip to content

Commit

Permalink
Merge pull request cylc#543 from cylc/1.4.x-sync
Browse files Browse the repository at this point in the history
🤖 Merge 1.4.x-sync into master
  • Loading branch information
oliver-sanders authored Jan 11, 2024
2 parents 864d1b0 + 71ca652 commit f2def73
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Build
uses: cylc/release-actions/build-python-package@v1
with:
with:
check-dependencies: false

- name: Inspect
Expand Down
42 changes: 38 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@ on:
pull_request:
workflow_dispatch:
push:
branches: [master]
branches:
- master
- '*.*.x'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
FORCE_COLOR: 2

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python: ['3.8', '3.9']
include:
- os: 'macos-latest'
- os: 'macos-11'
python: '3.8'
env:
PYTEST_ADDOPTS: --cov --color=yes
Expand Down Expand Up @@ -58,9 +68,11 @@ jobs:
run: pip install -e .[all]

- name: Style test
if: startsWith(matrix.os, 'ubuntu')
run: flake8

- name: Type checking
if: startsWith(matrix.os, 'ubuntu')
run: mypy

- name: Check changelog
Expand All @@ -75,8 +87,30 @@ jobs:
coverage xml --ignore-errors
coverage report
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage_${{ matrix.os }}_py-${{ matrix.python }}
path: coverage.xml
retention-days: 4

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

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

- name: Codecov upload
uses: codecov/codecov-action@v3
with:
name: '${{ matrix.os }} py-${{ matrix.python }}'
fail_ci_if_error: false
name: ${{ github.workflow }}
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 f2def73

Please sign in to comment.