-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (84 loc) · 2.52 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
on:
pull_request:
branches: [main]
push:
branches: [main]
# defaults:
# run:
# working-directory: popgetter-browser/
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.4.0
- name: Cache WASM build
uses: actions/cache@v3
with:
path: rust_backend/target
key: rust_backend
- name: Install dependencies for all packages
run: pnpm install
# NOTE: It's important to build @uatp/components _before_ uatp_template,
# since the latter depends on it.
- name: Test @uatp/components
run: |
pnpm --filter=@uatp/components build
pnpm --filter=@uatp/components test
- name: Test @uatp/template
run: |
pnpm --filter=@uatp/template rust
pnpm --filter=@uatp/template python
pnpm --filter=@uatp/template build
pnpm --filter=@uatp/template test
# pnpm can't do 'exec', have to use npm
- name: Install npm
uses: actions/setup-node@v4
- name: Test @uatp/create-web Rust
run: |
npm exec ./packages/create-web -- --directory /tmp/rust --project-name rust --backend rust
cd /tmp/rust/web
pnpm install
pnpm rust
pnpm build
pnpm test
- name: Test @uatp/create-web Python
run: |
npm exec ./packages/create-web -- --directory /tmp/python --project-name python --backend python
cd /tmp/python/web
pnpm install
pnpm python
pnpm build
pnpm test
- name: Test @uatp/create-web no-backend
run: |
npm exec ./packages/create-web -- --directory /tmp/none --project-name none --backend none
cd /tmp/none/web
pnpm install
pnpm build
pnpm test
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install pnpm components
run: |
pnpm install
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
- name: Update pre-commit
uses: pre-commit-ci/lite-action@main
if: always()