Skip to content

Commit

Permalink
Utilise the new pallets actions
Browse files Browse the repository at this point in the history
This should allow for a large reduction in duplicated action code
across the pallet's repos.
  • Loading branch information
pgjones committed Jan 2, 2025
1 parent 6b054f8 commit 145f61f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.x
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
hash: ${{ steps.hash.outputs.hash }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.x'
cache: pip
cache-dependency-path: requirements*/*.txt
- run: pip install -r requirements/build.txt
# Use the commit date instead of the current date during the build.
- run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
Expand Down Expand Up @@ -48,10 +48,11 @@ jobs:
- name: create release
run: >
gh release create --draft --repo ${{ github.repository }}
${{ github.ref_name }}
$REF_NAME
*.intoto.jsonl/* artifact/*
env:
GH_TOKEN: ${{ github.token }}
REF_NAME: ${{ github.ref_name }}
publish-pypi:
needs: [provenance]
# Wait for approval before attempting to upload to PyPI. This allows reviewing the
Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,18 @@ jobs:
- {name: Minimum Versions, python: '3.12', tox: py-min}
- {name: Development Versions, python: '3.9', tox: py-dev}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: pallets/actions/tox@5c46d4abb052877fa7e84db0ceec21b33673559e
with:
environment: ${{ format('py{0}', matrix.python) }}
python-version: ${{ matrix.python }}
allow-prereleases: true
cache: pip
cache-dependency-path: requirements*/*.txt
- run: pip install tox
- run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
typing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: pallets/actions/tox@5c46d4abb052877fa7e84db0ceec21b33673559e
with:
environment: 'typing'
python-version: '3.x'
cache: pip
cache-dependency-path: requirements*/*.txt
- name: cache mypy
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ./.mypy_cache
key: mypy|${{ hashFiles('pyproject.toml') }}
- run: pip install tox
- run: tox run -e typing
workflow:
runs-on: ubuntu-latest
steps:
- uses: pallets/actions/zizmor@5c46d4abb052877fa7e84db0ceec21b33673559e

0 comments on commit 145f61f

Please sign in to comment.