-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (97 loc) · 3.22 KB
/
Copy pathci.yml
File metadata and controls
104 lines (97 loc) · 3.22 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
node:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [20, 22, 24]
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install locked dependencies without lifecycle scripts
run: npm ci --ignore-scripts
- name: Run Node checks
run: npm run check
- name: Lint Markdown
run: npm run lint:markdown
- name: Audit runtime dependencies
run: npm audit --audit-level=moderate
- name: Inspect package contents
run: npm pack --dry-run
python:
name: Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.11", "3.12", "3.13", "3.14"]
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python }}
cache: pip
- name: Install project and test tools
run: python -m pip install '.[dev]'
- name: Lint
run: ruff check .
- name: Check formatting
run: ruff format --check .
- name: Test
run: python -m pytest
- name: Build wheel
run: python -m pip wheel . --no-deps --wheel-dir /tmp/remote-ssh-tunnel-wheel
dependency-audit:
name: Python Dependency Audit
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
cache: pip
- name: Install pip-audit
run: python -m pip install pip-audit==2.10.1
- name: Audit locked runtime requirement
run: pip-audit --strict --progress-spinner=off --cache-dir /tmp/pip-audit-cache --requirement requirements.txt
metadata:
name: Repository Metadata
runs-on: ubuntu-latest
steps:
- name: Check out full history
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
- name: Validate repository contracts
run: python scripts/validate_repository.py
- name: Lint GitHub Actions workflows
run: |
go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12
"$(go env GOPATH)/bin/actionlint"
- name: Check whitespace
run: git diff --check HEAD^