forked from foxglove/create-foxglove-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (71 loc) · 2.14 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
name: CI
on:
push:
branches: main
tags: v*
pull_request:
branches: "*"
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- run: corepack enable
- name: Configure Node.js
uses: actions/[email protected]
with:
node-version: 20.x
cache: yarn
- run: yarn install --immutable
- run: yarn run tsc --noEmit # typecheck files that are not included by webpack or package builds
- run: yarn lint:ci
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- run: corepack enable
- name: Configure Node.js
uses: actions/[email protected]
with:
node-version: 20.x
cache: yarn
- run: yarn install --immutable
- name: test
run: yarn run test --maxWorkers=100%
e2e:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- windows-2022
name: e2e (${{ matrix.os }})
steps:
- uses: actions/[email protected]
# On windows we need to run `corepack enable` after setup-node and on linux we need
# to run it before. On linux it is ok to run it after as well.
- run: corepack enable
if: matrix.os == 'windows-2022'
- name: Configure Node.js
uses: actions/[email protected]
with:
node-version: 20.x
- run: corepack enable
- run: yarn install --immutable
# pack into tarball so we can use it with npx
- run: yarn pack
- name: create sample extension
run: npx package.tgz sample
# install local package.tgz to use the lichtblick-scripts from this build
- run: npm install ../package.tgz
working-directory: sample
# confirm that the generated extension code passes lint
- name: lint generated extension code
working-directory: sample
run: npm run lint
# confirm that the generated extension code can be packaged
- name: package generated extension
working-directory: sample
run: npm run package