Repository navigation
118 lines (108 loc) · 3.01 KB
/
Copy pathci.yml
File metadata and controls
118 lines (108 loc) · 3.01 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: 0 5 * * 1
permissions: {}
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: 0.13.0
- run: uvx --from actionlint-py==1.7.12.25 actionlint
- env:
GH_TOKEN: ${{ github.token }}
run: uvx zizmor@1.30.1 .github
matrix-action:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
with:
egress-policy: audit
- id: lean
uses: $/.github/actions/matrix
with:
versions: '["3.12","3.13","3.14"]'
mode: lean
- id: full
uses: $/.github/actions/matrix
with:
versions: '["3.12"]'
mode: full
os-full: '["ubuntu-latest","windows-latest"]'
- env:
LEAN: ${{ steps.lean.outputs.include }}
FULL: ${{ steps.full.outputs.include }}
run: |
set -euo pipefail
test "$LEAN" = '[{"os":"ubuntu-latest","version":"3.12"},{"os":"ubuntu-latest","version":"3.14"}]'
test "$FULL" = '[{"os":"ubuntu-latest","version":"3.12"},{"os":"windows-latest","version":"3.12"}]'
test-library:
uses: ./.github/workflows/test.yml
permissions:
contents: read
id-token: write
with:
working-directory: tests/fixture-package
pixi-add: glpk
coverage: true
test-project:
uses: ./.github/workflows/test.yml
permissions:
contents: read
id-token: write
with:
working-directory: tests/fixture-project
pixi-task: test
pixi-environments: ^py3
benchmark:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/benchmark.yml
permissions:
contents: read
pull-requests: write
id-token: write
with:
mode: compare
benchmark-path: benchmarks
working-directory: tests/fixture-package
link-check:
uses: ./.github/workflows/link-check.yml
permissions:
contents: read
with:
working-directory: tests/fixture-package
release:
uses: ./.github/workflows/release.yml
permissions:
contents: write
id-token: write
with:
dry-run: true
test: false
tag: v0.0.0
working-directory: tests/fixture-package
pypsa-eur:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/pypsa-eur.yml
permissions:
contents: read
pull-requests: read
with:
package: pypsa
repository: PyPSA/PyPSA
rev: master