Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,35 @@ concurrency:
cancel-in-progress: true

jobs:
debug:
runs-on: ubuntu-latest
steps:
- name: Test secret 1
run: >-
echo ${{ secrets.TEST_SECRET }}
- name: Test secret 2
env:
TEST_SECRET: ${{ secrets.TEST_SECRET }}
run: >-
echo ${{ secrets.TEST_SECRET }}
echo $TEST_SECRET


prepare:
runs-on: ubuntu-latest
outputs:
wheel-distribution: ${{ steps.wheel-distribution.outputs.path }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with: {fetch-depth: 0} # deep clone for setuptools-scm
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
id: setup-python
with: {python-version: "3.11"}
- name: Run static analysis and format checkers
run: pipx run pre-commit run --all-files --show-diff-on-failure
- name: Build package distribution files
env:
CI_JOB_TOKEN: ${{ secrets.CI_JOB_TOKEN }}
run: >-
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
tox -e clean,build
Expand All @@ -49,7 +65,7 @@ jobs:
- name: Store the distribution files for use in other stages
# `tests` and `publish` will use the same pre-built distributions,
# so we make sure to release the exact same package that was tested
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-distribution-files
path: dist/
Expand All @@ -60,21 +76,21 @@ jobs:
strategy:
matrix:
python:
- "3.8" # oldest Python supported by PSF
- "3.11" # newest Python that is stable
- "3.8"
- "3.11"
platform:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python }}
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with: {name: python-distribution-files, path: dist/}
- name: Run tests
run: >-
Expand Down Expand Up @@ -108,11 +124,11 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: {python-version: "3.11"}
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with: {name: python-distribution-files, path: dist/}
- name: Publish Package
env:
Expand Down