-
Notifications
You must be signed in to change notification settings - Fork 1
157 lines (150 loc) · 4.48 KB
/
ci.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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: CI
on:
push:
branches: [main]
pull_request:
branches: ['*']
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: '1'
PIP_DISABLE_PIP_VERSION_CHECK: '1'
CACHE_EPOCH: '3'
URLJSF_PIXI_VERSION: 0.35.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: v${{ env.URLJSF_PIXI_VERSION }}
cache: true
environments: build
cache-key: job-build
- name: cache (node)
uses: actions/cache@v4
with:
path: node_modules
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- run: pixi run build-yarn
- run: ls node_modules/.skip-yarn || mkdir -p build && echo '1' > node_modules/.skip-yarn
- run: pixi run dist
- uses: actions/upload-artifact@v4
with:
name: urljsf-${{ github.run_number }}-dist
path: |
./dist
- uses: actions/upload-artifact@v4
with:
name: urljsf-${{ github.run_number }}-build
path: |
build/task-cache-v0
js/lib
js/dist
js/tsconfig.tsbuildinfo
src/urljs/_static
lint:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: v${{ env.URLJSF_PIXI_VERSION }}
cache: true
environments: build lint
cache-key: job-lint
- uses: actions/download-artifact@v4
with:
name: urljsf-${{ github.run_number }}-build
- name: cache (node)
uses: actions/cache@v4
with:
path: node_modules
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- run: pixi run fix
- run: pixi run lint
test:
needs: [build]
name: ${{ matrix.test-env }} (${{ matrix.vm }})
runs-on: ${{ matrix.vm }}
strategy:
fail-fast: false
matrix:
vm: [ubuntu-latest, windows-latest, macos-13, macos-latest]
test-env: [test, test-min]
exclude:
- { vm: macos-13, test-env: test }
- { vm: macos-latest, test-env: test-min }
include:
- { test-env: test }
- { test-env: test-min }
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: v${{ env.URLJSF_PIXI_VERSION }}
cache: true
environments: build ${{ matrix.test-env }}
cache-key: job-test-${{ matrix.test-env }}
- uses: actions/download-artifact@v4
with:
name: urljsf-${{ github.run_number }}-dist
path: |
./dist
- uses: actions/download-artifact@v4
with:
name: urljsf-${{ github.run_number }}-build
- run: pixi run -v ${{ matrix.test-env }}-pytest
- uses: actions/upload-artifact@v4
if: always()
with:
name: urljsf-${{ github.run_number }}-${{ matrix.test-env }}-${{ matrix.vm }}
path: ./build/reports
docs:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: v${{ env.URLJSF_PIXI_VERSION }}
cache: true
environments: build docs check atest
cache-key: job-docs
- name: cache (node)
uses: actions/cache@v4
with:
path: node_modules
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- uses: actions/download-artifact@v4
with:
name: urljsf-${{ github.run_number }}-dist
path: |
./dist
- uses: actions/download-artifact@v4
with:
name: urljsf-${{ github.run_number }}-build
- run: pixi run build-yarn
- run: pixi run docs
- uses: actions/upload-artifact@v4
if: always()
with:
name: urljsf-${{ github.run_number }}-docs
path: ./build/docs
- run: pixi run build-app-cov
- run: pixi run atest
- run: pixi run check
- run: pixi run report
if: always()
- uses: actions/upload-artifact@v4
if: always()
with:
name: urljsf-${{ github.run_number }}-docs-reports
path: ./build/reports