Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into 8.2.x-sync
Browse files Browse the repository at this point in the history
* upstream/master: (81 commits)
  Apply suggestions from code review [skip ci]
  Added missing union type import (cylc#5906)
  coverage: exclude report-timings and set 90% as the lower limit
  lint: Warn users that `CYLC_VERSION={{CYLC_VERSION}}` is deprecated (cylc#5890)
  Add a new entry_point for xtriggers (cylc#5831)
  Tests: fix cached datetime arithmetic contamination between tests using different calendar modes
  Replace cyclers functional reftests with integration reftests
  Simplify integration reftest
  Replace pre-initial functional reftests with integration reftests
  Integration tests: add a simpler reftest fixture
  auto update syntax files
  Feat.lint obsolete vars (cylc#5879)
  dump: restrict window to n=0 (cylc#5600)
  Test.example replace a reftest (cylc#5860)
  GH Actions artifact name fixes
  Bump actions/upload-artifact from 3 to 4
  Bump actions/download-artifact from 3 to 4
  tests/i: update tui screenshot
  Update .github/workflows/test_fast.yml
  actions: add non-utc job to fast tests
  ...
  • Loading branch information
wxtim committed Jan 12, 2024
2 parents 477c858 + a7cf51b commit 747517a
Show file tree
Hide file tree
Showing 220 changed files with 7,101 additions and 2,135 deletions.
5 changes: 3 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@ coverage:
project:
default:
# commits below this threshold will be marked as failed
target: '85%'
target: '92%'
# how much we allow the coverage to drop
threshold: '2%'
patch:
default:
target: '95%'
target: '97%'
threshold: '5%'

# files to ignore
ignore:
- "tests/**"
- "ws_messages_pb2.py"
- "cylc/flow/scripts/report_timings.py"

flag_management:
default_rules:
Expand Down
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ omit =
tests/*
*/cylc/flow/*_pb2.py
cylc/flow/etc/*
cylc/flow/scripts/report_timings.py
parallel = True
source = ./cylc
timid = False
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/1_create_release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: cylc/release-actions/stage-1/sanitize-inputs@v1

- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.BASE_REF }}
fetch-depth: 0 # need to fetch all commits to check contributors
Expand All @@ -30,7 +30,7 @@ jobs:
uses: cylc/release-actions/check-shortlog@v1

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/2_auto_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
steps:

- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.MERGE_SHA }}

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -38,7 +38,7 @@ jobs:
uses: cylc/release-actions/build-python-package@v1

- name: Publish distribution to PyPI
uses: pypa/[email protected].8
uses: pypa/[email protected].11
with:
user: __token__ # uses the API token feature of PyPI - least permissions possible
password: ${{ secrets.PYPI_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- '5.0'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Docker container
run: |
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Upload artifact
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Upload cylc-run artifact
name: 'cylc-run (bash-${{ matrix.bash-version }})'
path: cylc-run
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
python: '3.7'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shortlog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # need to fetch all commits to check contributors

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
timeout-minutes: 10
steps:
- name: checkout cylc-flow
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: build conda env
run: |
Expand Down
94 changes: 54 additions & 40 deletions .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,38 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false # Don't let a failed MacOS run stop the Ubuntu runs
fail-fast: false # don't stop on first failure
matrix:
os: ['ubuntu-latest']
python-version: ['3.7', '3.8', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.10', '3.11', '3']
include:
# mac os test
- os: 'macos-11'
python-version: '3.7' # oldest supported version

# non-utc timezone test
- os: 'ubuntu-latest'
python-version: '3.9' # not the oldest, not the most recent version
time-zone: 'XXX-09:35'

env:
TZ: ${{ matrix.time-zone }}
PYTEST_ADDOPTS: --cov --cov-append -n 5 --color=yes

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Apt-Get Install
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y shellcheck sqlite3
sudo apt-get install -y sqlite3
- name: Install
run: |
Expand All @@ -54,37 +57,10 @@ jobs:
- name: Configure git # Needed by the odd test
uses: cylc/release-actions/configure-git@v1

- name: Check changelog
if: startsWith(matrix.os, 'ubuntu')
run: towncrier build --draft

- name: Style
if: startsWith(matrix.os, 'ubuntu')
run: |
flake8
etc/bin/shellchecker
# note: exclude python 3.10+ from mypy checks as these produce false
# positives in installed libraries for python 3.7
- name: Typing
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.python-version, 3.9)
run: mypy

- name: Doctests
timeout-minutes: 4
run: |
pytest cylc/flow
- name: Unit Tests
timeout-minutes: 4
timeout-minutes: 5
run: |
pytest tests/unit
- name: Bandit
if: ${{ matrix.python-version == '3.7' }}
# https://github.com/PyCQA/bandit/issues/658
run: |
bandit -r --ini .bandit cylc/flow
pytest cylc/flow tests/unit
- name: Integration Tests
timeout-minutes: 6
Expand All @@ -93,7 +69,7 @@ jobs:
- name: Upload failed tests artifact
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cylc-run (${{ matrix.os }} py-${{ matrix.python-version }})
path: ~/cylc-run/
Expand All @@ -104,26 +80,64 @@ jobs:
coverage report
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
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@v5
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
if: startsWith(matrix.python-version, '3.10')
run: pytest -m linkcheck --dist=load tests/unit
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@v3
uses: actions/checkout@v4

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

- name: Codecov upload
uses: codecov/codecov-action@v3
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/test_functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
# NOTE: includes must define ALL of the matrix values
include:
# latest python
- name: 'py-3.11'
- name: 'py-3-latest'
os: 'ubuntu-latest'
python-version: '3.11'
python-version: '3'
test-base: 'tests/f'
chunk: '1/4'
platform: '_local_background*'
Expand Down Expand Up @@ -96,10 +96,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -108,7 +108,7 @@ jobs:
run: |
# install system deps
brew update
brew install bash coreutils gnu-sed
brew install bash coreutils gnu-sed grep
# add GNU coreutils and sed to the user PATH
# (see instructions in brew install output)
Expand All @@ -118,6 +118,9 @@ jobs:
echo \
"/usr/local/opt/gnu-sed/libexec/gnubin" \
>> "${GITHUB_PATH}"
echo \
"/usr/local/opt/grep/libexec/gnubin" \
>> "${GITHUB_PATH}"
# add coreutils to the bashrc too (for jobs)
cat >> "${HOME}/.bashrc" <<__HERE__
Expand Down Expand Up @@ -248,6 +251,7 @@ jobs:
-exec echo '====== {} ======' \; -exec cat '{}' \;
- name: Set artifact upload name
if: always()
id: uploadname
run: |
# artifact name cannot contain '/' characters
Expand All @@ -256,7 +260,7 @@ jobs:
- name: Upload failed tests artifact
if: failure() && steps.test.outcome == 'failure'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cylc-run (${{ steps.uploadname.outputs.uploadname }})
path: ~/cylc-run/
Expand Down Expand Up @@ -294,7 +298,7 @@ jobs:
coverage report
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage_${{ steps.uploadname.outputs.uploadname }}
path: coverage.xml
Expand All @@ -306,10 +310,10 @@ jobs:
timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Codecov upload
uses: codecov/codecov-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure git # Needed by the odd test
uses: cylc/release-actions/configure-git@v1

- name: Configure Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_tutorial_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
test:
strategy:
matrix:
python-version: ['3.7', '3.11']
python-version: ['3.7', '3']
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: configure python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
Loading

0 comments on commit 747517a

Please sign in to comment.