Add required permissions and all-tests-passed (#107)

This commit is contained in:
Kevin Stillhammer
2025-03-21 15:06:07 +01:00
committed by GitHub
parent 94d4d711a6
commit faac838a0b
6 changed files with 41 additions and 59 deletions
+31 -9
View File
@@ -1,7 +1,7 @@
name: "test"
on:
pull_request:
workflow_dispatch:
pull_request:
push:
branches:
- main
@@ -170,16 +170,12 @@ jobs:
env:
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
test-checksum:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.inputs.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
checksum:
["0de731c669b9ece77e799ac3f4a160c30849752714d9775c94cc4cfaf326860c"]
exclude:
- os: macos-latest
inputs:
- os: ubuntu-latest
checksum: "0de731c669b9ece77e799ac3f4a160c30849752714d9775c94cc4cfaf326860c"
include:
- os: macos-latest
checksum: "af9583bff12afbca5d5670334e0187dd60c4d91bc71317d1b2dde70cb1200ba9"
steps:
@@ -188,7 +184,7 @@ jobs:
uses: ./
with:
version: "0.7.4"
checksum: ${{ matrix.checksum }}
checksum: ${{ matrix.inputs.checksum }}
src: __tests__/fixtures/python-project
test-with-explicit-token:
runs-on: ubuntu-latest
@@ -252,3 +248,29 @@ jobs:
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-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-optional-dependencies
- test-default-version-from-requirements
- test-semver-range
- 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') }}"
# shellcheck disable=SC2242
exit ${{ contains(needs.*.result, 'failure') && 1 || 0 }}