forked from beeware/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.75 KB
/
towncrier-run.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Run towncrier Check
#######
# Runs `tox -e towncrier-check` for the repository.
#######
on:
workflow_call:
inputs:
python-version:
description: "Python version to use; defaults to latest Python release."
default: "3.X"
type: string
repository:
description: "GitHub repository to checkout; defaults to repo running this workflow."
default: ${{ github.repository }}
type: string
tox-source:
description: "The arguments for `pip install` to install tox; use ./path/to/package[dev] for the repo's pinned version."
default: ".[dev]"
type: string
runner-os:
description: "Runner OS to use to run tox; defaults to ubuntu-latest"
default: "ubuntu-latest"
type: string
defaults:
run:
shell: bash
env:
FORCE_COLOR: "1"
jobs:
towncrier:
name: Towncrier Checks
runs-on: ${{ inputs.runner-os }}
timeout-minutes: 10
steps:
- name: Checkout Default Branch
uses: actions/checkout@v3.3.0
with:
repository: ${{ inputs.repository }}
ref: ${{ github.event.repository.default_branch }}
fetch-depth: 0
- name: Checkout Current Branch
uses: actions/checkout@v3.3.0
with:
repository: ${{ inputs.repository }}
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4.6.0
with:
python-version: ${{ inputs.python-version }}
cache: "pip"
cache-dependency-path: |
**/setup.cfg
**/pyproject.toml
- name: Update pip
run: python -m pip install -U pip
- name: Install towncrier
run: python -m pip install ${{ inputs.tox-source }}
- name: Run towncrier check
run: tox -e towncrier-check