Skip to content

Commit b843bf9

Browse files
committed
Steal a few good ideas from the attrs GH workflow.
1 parent 615d1ee commit b843bf9

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,46 @@ on:
99
# Daily at 8:33
1010
- cron: "33 8 * * *"
1111

12+
env:
13+
PIP_DISABLE_PIP_VERSION_CHECK: "1"
14+
PIP_NO_PYTHON_VERSION_WARNING: "1"
15+
PYTHON_LATEST: "3.11"
16+
1217
jobs:
1318
pre-commit:
1419
runs-on: ubuntu-latest
1520
steps:
1621
- uses: actions/checkout@v3
1722
- uses: actions/setup-python@v4
1823
with:
19-
python-version: "3.11"
24+
python-version: ${{ env.PYTHON_LATEST }}
2025
- uses: pre-commit/[email protected]
2126

2227
ci:
2328
runs-on: ubuntu-latest
2429

2530
steps:
31+
- name: Harden Runner
32+
uses: step-security/harden-runner@v2
33+
with:
34+
egress-policy: block
35+
allowed-endpoints: >
36+
api.github.com:443
37+
files.pythonhosted.org:443
38+
github.com:443
39+
objects.githubusercontent.com:443
40+
pypi.org:443
2641
- uses: actions/checkout@v3
2742
- name: Install dependencies
28-
run: >
29-
sudo apt-get update &&
30-
sudo apt-get install -y libenchant-2-dev libxml2-dev libxslt-dev
43+
run: sudo apt-get update && sudo apt-get install -y libenchant-2-dev
3144
if: runner.os == 'Linux'
3245
- name: Install dependencies
3346
run: brew install enchant
3447
if: runner.os == 'macOS'
3548
- name: Set up Python
3649
uses: actions/setup-python@v4
3750
with:
38-
python-version: "3.11"
51+
python-version: ${{env.PYTHON_LATEST}}
3952
- name: Set up nox
4053
uses: wntrblm/[email protected]
4154
- name: Run nox
@@ -50,7 +63,7 @@ jobs:
5063
- name: Set up Python
5164
uses: actions/setup-python@v4
5265
with:
53-
python-version: "3.11"
66+
python-version: ${{ env.PYTHON_LATEST }}
5467
- name: Install dependencies
5568
run: python -m pip install build
5669
- name: Create packages

0 commit comments

Comments
 (0)