Skip to content
Open
Show file tree
Hide file tree
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
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: reusable build step

on:
workflow_call:
inputs:
python-version:
required: true
type: string
nox-env:
required: true
type: string
jobs:
build:
name: ${{ inputs.nox-env }}
if: ${{ github.repository_owner == 'pypa' || github.event_name != 'schedule' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'

- name: Install dependencies
run: |
python -m pip install --upgrade nox virtualenv

- name: Nox ${{ inputs.nox-env }}
run: |
python -m nox -s ${{ inputs.nox-env }}
42 changes: 19 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,29 @@ concurrency:
cancel-in-progress: true

jobs:
build:
name: ${{ matrix.noxenv }}
if: ${{ github.repository_owner == 'pypa' || github.event_name != 'schedule' }}
runs-on: ubuntu-latest

build-python:
strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
noxenv:
- build
- linkcheck

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: 'requirements.txt'
uses: ./.github/workflows/build.yml
with:
python-version: ${{ matrix.python }}
nox-env: ${{ matrix.noxenv }}

- name: Install dependencies
run: |
python -m pip install --upgrade nox virtualenv

- name: Nox ${{ matrix.noxenv }}
run: |
python -m nox -s ${{ matrix.noxenv }}

link-check:
strategy:
matrix:
python: ['3.11']
noxenv:
- linkcheck
uses: ./.github/workflows/build.yml
with:
python-version: ${{ matrix.python }}
nox-env: ${{ matrix.noxenv }}

check:
# This job does nothing and is only used for the branch protection
Expand All @@ -49,7 +44,8 @@ jobs:
if: always()

needs:
- build
- build-python
- link-check

runs-on: ubuntu-latest

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/translation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Grab the repo src
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # To reach the common commit
- name: Set up git user as [bot]
Expand Down Expand Up @@ -51,10 +51,12 @@ jobs:
git merge '${{ github.event.repository.default_branch }}'

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: >-
3.10
cache: 'pip'
cache-dependency-path: 'requirements.txt'

- name: Install Python tooling
run: python -m pip install --upgrade nox virtualenv
Expand Down