Skip to content

Commit

Permalink
Update workflows (#317)
Browse files Browse the repository at this point in the history
* workflow updates

* no _wip

* seaborn

* fixes

* only raise on submodule mossing
  • Loading branch information
MatthewMiddlehurst authored Dec 5, 2024
1 parent c386c1b commit 69b9b18
Show file tree
Hide file tree
Showing 24 changed files with 617 additions and 274 deletions.
1 change: 0 additions & 1 deletion .github/utilities/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ CMD="jupyter nbconvert --to notebook --inplace --execute --ExecutePreprocessor.t

excluded=(
"tsml_eval/publications/y2023/distance_based_clustering/package_distance_timing.ipynb"
"examples/regression_experiments.ipynb"
)
if [ "$1" = true ]; then
excluded+=()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue_comment_edited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
jobs:
pr-welcome-edited:
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/create-github-app-token@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue_comment_posted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
self-assign:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
67 changes: 63 additions & 4 deletions .github/workflows/periodic_github_maintenace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ on:
- cron: "0 1 1,15 * *"
workflow_dispatch:

permissions:
issues: write
contents: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
stale_branches:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

permissions:
issues: write
contents: write

steps:
- uses: actions/create-github-app-token@v1
Expand All @@ -32,3 +36,58 @@ jobs:
stale-branch-label: "stale branch"
compare-branches: "info"
pr-check: true

pre-commit-auto-update:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- uses: browniebroke/[email protected]

- if: always()
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
private-key: ${{ secrets.PR_APP_KEY }}

- if: always()
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: "Automated `pre-commit` hook update"
branch: pre-commit-hooks-update
title: "[MNT] Automated `pre-commit` hook update"
body: "Automated weekly update to `.pre-commit-config.yaml` hook versions."
labels: maintenance, full pre-commit

github-security-scorecard:
runs-on: ubuntu-24.04

permissions:
security-events: write
id-token: write

steps:
- uses: actions/checkout@v4

- uses: ossf/[email protected]
with:
results_file: results.sarif
results_format: sarif
publish_results: true

- uses: actions/upload-artifact@v4
with:
name: SARIF file
path: results.sarif
retention-days: 5

- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
71 changes: 66 additions & 5 deletions .github/workflows/periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
check-manifest:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand All @@ -26,7 +26,7 @@ jobs:
extra_args: check-manifest --hook-stage manual

pre-commit:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
run: mypy tsml_eval/

run-notebook-examples:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -99,13 +99,74 @@ jobs:
path: ${{ github.workspace }}/.numba_cache
key: numba-run-notebook-examples-${{ runner.os }}-3.10-${{ env.CURRENT_DATE }}

test-no-soft-deps:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Use numba cache to set env variables but not restore cache
uses: ./.github/actions/numba_cache
with:
cache_name: "test-no-soft-deps"
runner_os: ${{ runner.os }}
python_version: "3.10"
restore_cache: "false"

- name: Install
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .[dev]

- name: Show dependencies
run: python -m pip list

- name: Run tests
run: python -m pytest -n logical

- name: Save new cache
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/.numba_cache
# Save cache with the current date (ENV set in numba_cache action)
key: numba-test-no-soft-deps-${{ runner.os }}-3.10-${{ env.CURRENT_DATE }}

test-core-imports:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .

- name: Show dependencies
run: python -m pip list

- name: Run import test
run: python tsml_eval/testing/tests/test_core_imports.py

pytest:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, macos-14, windows-2022 ]
os: [ ubuntu-24.04, macos-14, windows-2022 ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]

steps:
Expand Down Expand Up @@ -143,7 +204,7 @@ jobs:
key: numba-pytest-${{ runner.os }}-${{ matrix.python-version}}-${{ env.CURRENT_DATE }}

codecov:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
run-notebook-examples:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
jobs:
# based on the scikit-learn 1.3.1 PR labelers
labeler:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
pre-commit:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/create-github-app-token@v1
Expand Down
57 changes: 55 additions & 2 deletions .github/workflows/pr_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,66 @@ concurrency:
cancel-in-progress: true

jobs:
test-no-soft-deps:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Restore numba cache
uses: ./.github/actions/numba_cache
with:
cache_name: "test-no-soft-deps"
runner_os: ${{ runner.os }}
python_version: "3.10"

- name: Install
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .[dev]

- name: Show dependencies
run: python -m pip list

- name: Run tests
run: python -m pytest -n logical

test-core-imports:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .

- name: Show dependencies
run: python -m pip list

- name: Run import test
run: python tsml_eval/testing/tests/test_core_imports.py

pytest:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, windows-2022 ]
os: [ ubuntu-24.04, windows-2022 ]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
# skip python versions unless the PR has the 'full pytest actions' label
pr-testing:
Expand Down Expand Up @@ -60,7 +113,7 @@ jobs:
run: python -m pytest -n logical

codecov:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr_typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- main
paths:
- "tsml_eval/**"
- "pyproject.toml"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/precommit_autoupdate.yml

This file was deleted.

Loading

0 comments on commit 69b9b18

Please sign in to comment.