Skip to content

Commit

Permalink
TST: use exact commit sha for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Oct 27, 2024
1 parent 2cdfe1b commit 5f7d5fb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ jobs:
lint_python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.x
- uses: astral-sh/setup-uv@v2
- uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
- run: uv venv
- run: uv pip compile pyproject.toml | uv pip install -r -
- run: shopt -s globstar
Expand Down
33 changes: 19 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
with:
enable-cache: true
cache-dependency-glob: pyproject.toml

- name: Build
run: |
Expand Down Expand Up @@ -139,10 +140,11 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
with:
enable-cache: true
cache-dependency-glob: pyproject.toml

- name: Run mypy
run: |
Expand All @@ -159,17 +161,18 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
with:
enable-cache: true
cache-dependency-glob: pyproject.toml

- name: Build
run: |
uvx --python 3.12 --with-requirements=requirements/docs.txt --from sphinx \
sphinx-build -M html docs/source site -W
- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: site
path: site
Expand All @@ -183,26 +186,28 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
- run: uvx check-manifest

build-artifacts:
name: Build artifacts
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
- run: uv build
- run: uvx twine check dist/*

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: dist
path: dist
Expand All @@ -227,11 +232,11 @@ jobs:
id-token: write

steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: dist
path: dist

- name: Publish package distributions to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3

0 comments on commit 5f7d5fb

Please sign in to comment.