mirror of
https://github.com/astral-sh/ruff-action.git
synced 2026-05-14 21:40:14 +02:00
e46bd63c5f
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.4.0 to 6.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/setup-node/releases">actions/setup-node's releases</a>.</em></p> <blockquote> <h2>v6.0.0</h2> <h2>What's Changed</h2> <p><strong>Breaking Changes</strong></p> <ul> <li>Limit automatic caching to npm, update workflows and documentation by <a href="https://github.com/priyagupta108"><code>@priyagupta108</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1374">actions/setup-node#1374</a></li> </ul> <p><strong>Dependency Upgrades</strong></p> <ul> <li>Upgrade ts-jest from 29.1.2 to 29.4.1 and document breaking changes in v5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/setup-node/pull/1336">#1336</a></li> <li>Upgrade prettier from 2.8.8 to 3.6.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/setup-node/pull/1334">#1334</a></li> <li>Upgrade actions/publish-action from 0.3.0 to 0.4.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/setup-node/pull/1362">#1362</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-node/compare/v5...v6.0.0">https://github.com/actions/setup-node/compare/v5...v6.0.0</a></p> <h2>v5.0.0</h2> <h2>What's Changed</h2> <h3>Breaking Changes</h3> <ul> <li>Enhance caching in setup-node with automatic package manager detection by <a href="https://github.com/priya-kinthali"><code>@priya-kinthali</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1348">actions/setup-node#1348</a></li> </ul> <p>This update, introduces automatic caching when a valid <code>packageManager</code> field is present in your <code>package.json</code>. This aims to improve workflow performance and make dependency management more seamless. To disable this automatic caching, set <code>package-manager-cache: false</code></p> <pre lang="yaml"><code>steps: - uses: actions/checkout@v5 - uses: actions/setup-node@v5 with: package-manager-cache: false </code></pre> <ul> <li>Upgrade action to use node24 by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1325">actions/setup-node#1325</a></li> </ul> <p>Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. <a href="https://github.com/actions/runner/releases/tag/v2.327.1">See Release Notes</a></p> <h3>Dependency Upgrades</h3> <ul> <li>Upgrade <code>@octokit/request-error</code> and <code>@actions/github</code> by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/setup-node/pull/1227">actions/setup-node#1227</a></li> <li>Upgrade uuid from 9.0.1 to 11.1.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/setup-node/pull/1273">actions/setup-node#1273</a></li> <li>Upgrade undici from 5.28.5 to 5.29.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/setup-node/pull/1295">actions/setup-node#1295</a></li> <li>Upgrade form-data to bring in fix for critical vulnerability by <a href="https://github.com/gowridurgad"><code>@gowridurgad</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1332">actions/setup-node#1332</a></li> <li>Upgrade actions/checkout from 4 to 5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a>[bot] in <a href="https://redirect.github.com/actions/setup-node/pull/1345">actions/setup-node#1345</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/priya-kinthali"><code>@priya-kinthali</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1348">actions/setup-node#1348</a></li> <li><a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1325">actions/setup-node#1325</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-node/compare/v4...v5.0.0">https://github.com/actions/setup-node/compare/v4...v5.0.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/setup-node/commit/2028fbc5c25fe9cf00d9f06a71cc4710d4507903"><code>2028fbc</code></a> Limit automatic caching to npm, update workflows and documentation (<a href="https://redirect.github.com/actions/setup-node/issues/1374">#1374</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/13427813f706a0f6c9b74603b31103c40ab1c35a"><code>1342781</code></a> Bump actions/publish-action from 0.3.0 to 0.4.0 (<a href="https://redirect.github.com/actions/setup-node/issues/1362">#1362</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/89d709d423dc495668cd762a18dd4a070611be3f"><code>89d709d</code></a> Bump prettier from 2.8.8 to 3.6.2 (<a href="https://redirect.github.com/actions/setup-node/issues/1334">#1334</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/cd2651c46231bc0d6f48d6b34433b845331235fe"><code>cd2651c</code></a> Bump ts-jest from 29.1.2 to 29.4.1 (<a href="https://redirect.github.com/actions/setup-node/issues/1336">#1336</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/a0853c24544627f65ddf259abe73b1d18a591444"><code>a0853c2</code></a> Bump actions/checkout from 4 to 5 (<a href="https://redirect.github.com/actions/setup-node/issues/1345">#1345</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/b7234cc9fe124f0f4932554b4e5284543083ae7b"><code>b7234cc</code></a> Upgrade action to use node24 (<a href="https://redirect.github.com/actions/setup-node/issues/1325">#1325</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/d7a11313b581b306c961b506cfc8971208bb03f6"><code>d7a1131</code></a> Enhance caching in setup-node with automatic package manager detection (<a href="https://redirect.github.com/actions/setup-node/issues/1348">#1348</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/5e2628c959b9ade56971c0afcebbe5332d44b398"><code>5e2628c</code></a> Bumps form-data (<a href="https://redirect.github.com/actions/setup-node/issues/1332">#1332</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/65beceff8e91358525397bdce9103d999507ab03"><code>65becef</code></a> Bump undici from 5.28.5 to 5.29.0 (<a href="https://redirect.github.com/actions/setup-node/issues/1295">#1295</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/7e24a656e1c7a0d6f3eaef8d8e84ae379a5b035b"><code>7e24a65</code></a> Bump uuid from 9.0.1 to 11.1.0 (<a href="https://redirect.github.com/actions/setup-node/issues/1273">#1273</a>)</li> <li>Additional commits viewable in <a href="https://github.com/actions/setup-node/compare/49933ea5288caeca8642d1e84afbd3f7d6820020...2028fbc5c25fe9cf00d9f06a71cc4710d4507903">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
400 lines
13 KiB
YAML
400 lines
13 KiB
YAML
name: "test"
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Actionlint
|
|
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
|
|
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
with:
|
|
node-version: "20"
|
|
- run: |
|
|
npm install
|
|
- run: |
|
|
npm run all
|
|
- name: Check all jobs are in all-tests-passed.needs
|
|
run: |
|
|
tsc check-all-tests-passed-needs.ts
|
|
node check-all-tests-passed-needs.js
|
|
working-directory: .github/scripts
|
|
- name: Make sure no changes from linters are detected
|
|
run: |
|
|
git diff --exit-code || (echo "::error::Please run 'npm run all' to fix the issues" && exit 1)
|
|
test-latest-version:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use latest version
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/python-project
|
|
version: latest
|
|
test-specific-version:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
ruff-version: ["0.1.7", "0.1.8", "0.4.7", "0.4.10", "0.7", "0.7.x", ">=0.7.0"]
|
|
os: [ ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-14, windows-latest ]
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use version ${{ matrix.ruff-version }}
|
|
uses: ./
|
|
with:
|
|
version: ${{ matrix.ruff-version }}
|
|
src: __tests__/fixtures/python-project
|
|
test-unsupported-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Try install old version
|
|
id: install
|
|
continue-on-error: true
|
|
uses: ./
|
|
with:
|
|
version: 0.0.246
|
|
src: __tests__/fixtures/python-project
|
|
- name: Check if the action failed
|
|
run: |
|
|
if [ "${INSTALL_OUTCOME}" == "success" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
INSTALL_OUTCOME: ${{ steps.install.outcome }}
|
|
test-version-from-version-file-pyproject:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use version from pyproject.toml
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/python-project
|
|
version-file: __tests__/fixtures/pyproject.toml
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.9.3" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-default-version-from-pyproject:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use default version from pyproject.toml
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/python-project
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.6.2" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-default-version-from-pyproject-dev-group:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use default version from pyproject.toml dev group
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/pyproject-dependency-dev-project
|
|
version-file: __tests__/fixtures/pyproject-dependency-dev-project/pyproject.toml
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.8.3" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-default-version-from-pyproject-dependency-groups:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use default version from pyproject.toml dependency groups
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/pyproject-dependency-groups-project
|
|
version-file: __tests__/fixtures/pyproject-dependency-groups-project/pyproject.toml
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.8.3" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-default-version-from-pyproject-poetry-groups:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use default version from pyproject.toml poetry group dependencies
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/pyproject-dependency-poetry-grouped-project
|
|
version-file: __tests__/fixtures/pyproject-dependency-poetry-grouped-project/pyproject.toml
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.8.3" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-default-version-from-pyproject-poetry:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use default version from pyproject.toml poetry dependencies
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/pyproject-dependency-poetry-project
|
|
version-file: __tests__/fixtures/pyproject-dependency-poetry-project/pyproject.toml
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.8.6" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-default-version-from-pyproject-optional-dependencies:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use default version from pyproject.toml optional dependencies
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/pyproject-optional-dependencies-project
|
|
version-file: __tests__/fixtures/pyproject-optional-dependencies-project/pyproject.toml
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.8.3" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-default-version-from-requirements:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use default version from requirements.txt
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/python-project
|
|
version-file: __tests__/fixtures/requirements.txt
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.9.0" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-semver-range:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use version 0.7
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
version: "0.7"
|
|
src: __tests__/fixtures/python-project
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.7.4" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-pep440-version-specifier:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Install version 0.9.10
|
|
id: ruff-action
|
|
uses: ./
|
|
with:
|
|
version: ">=0.9.9,<0.10.0"
|
|
src: __tests__/fixtures/python-project
|
|
- name: Correct version gets installed
|
|
run: |
|
|
if [ "$RUFF_VERSION" != "0.9.10" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
|
test-checksum:
|
|
runs-on: ${{ matrix.inputs.os }}
|
|
strategy:
|
|
matrix:
|
|
inputs:
|
|
- os: ubuntu-latest
|
|
checksum: "0de731c669b9ece77e799ac3f4a160c30849752714d9775c94cc4cfaf326860c"
|
|
- os: macos-latest
|
|
checksum: "af9583bff12afbca5d5670334e0187dd60c4d91bc71317d1b2dde70cb1200ba9"
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Checksum matches expected
|
|
uses: ./
|
|
with:
|
|
version: "0.7.4"
|
|
checksum: ${{ matrix.inputs.checksum }}
|
|
src: __tests__/fixtures/python-project
|
|
test-with-explicit-token:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use default version
|
|
uses: ./
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
src: __tests__/fixtures/python-project
|
|
test-args:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use args
|
|
uses: ./
|
|
with:
|
|
args: format --check
|
|
src: __tests__/fixtures/python-project
|
|
test-failure:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Format should fail
|
|
id: format-should-fail
|
|
continue-on-error: true
|
|
uses: ./
|
|
with:
|
|
args: format --check
|
|
src: __tests__/fixtures/malformed-python-project
|
|
- name: Check if the action failed
|
|
run: |
|
|
if [ "${FORMAT_SHOULD_FAIL_OUTCOME}" == "success" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
FORMAT_SHOULD_FAIL_OUTCOME: ${{ steps.format-should-fail.outcome }}
|
|
- name: Check should fail
|
|
id: check-should-fail
|
|
continue-on-error: true
|
|
uses: ./
|
|
with:
|
|
src: __tests__/fixtures/malformed-python-project
|
|
- name: Check if the action failed
|
|
run: |
|
|
if [ "${CHECK_SHOULD_FAIL_OUTCOME}" == "success" ]; then
|
|
exit 1
|
|
fi
|
|
env:
|
|
CHECK_SHOULD_FAIL_OUTCOME: ${{ steps.check-should-fail.outcome }}
|
|
test-multiple-src:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest, windows-latest ]
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use args
|
|
uses: ./
|
|
with:
|
|
args: format --check
|
|
src: >-
|
|
__tests__/fixtures/python-project/src/python_project/__init__.py
|
|
__tests__/fixtures/python-project/src/python_project/hello_world.py
|
|
|
|
all-tests-passed:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- lint
|
|
- test-latest-version
|
|
- test-specific-version
|
|
- test-unsupported-version
|
|
- test-version-from-version-file-pyproject
|
|
- test-default-version-from-pyproject
|
|
- test-default-version-from-pyproject-dev-group
|
|
- test-default-version-from-pyproject-dependency-groups
|
|
- test-default-version-from-pyproject-poetry-groups
|
|
- test-default-version-from-pyproject-poetry
|
|
- test-default-version-from-pyproject-optional-dependencies
|
|
- test-default-version-from-requirements
|
|
- test-semver-range
|
|
- test-pep440-version-specifier
|
|
- test-checksum
|
|
- test-with-explicit-token
|
|
- test-args
|
|
- test-failure
|
|
- test-multiple-src
|
|
if: always()
|
|
steps:
|
|
- name: All tests passed
|
|
run: |
|
|
echo "All jobs passed: ${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}"
|
|
# shellcheck disable=SC2242
|
|
exit ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && 1 || 0 }}
|