-
Notifications
You must be signed in to change notification settings - Fork 1.5k
33 lines (29 loc) · 812 Bytes
/
build.yml
File metadata and controls
33 lines (29 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 }}