-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (55 loc) · 1.53 KB
/
ci.yml
File metadata and controls
69 lines (55 loc) · 1.53 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Build
run: go build ./...
- name: Test
run: go test -race ./...
- name: Lint
uses: golangci/golangci-lint-action@v7
with:
version: latest
ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout workflow-ui
uses: actions/checkout@v4
with:
repository: GoCodeAlone/workflow-ui
path: workflow-ui-dep
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://npm.pkg.github.com'
cache: 'npm'
cache-dependency-path: ui/package-lock.json
- name: Build workflow-ui
run: |
cd workflow-ui-dep
npm ci
npm run build
- name: Link workflow-ui
run: |
# package-lock.json resolves workflow-ui as ../../workflow-ui relative to ui/
# which is ../workflow-ui from the repo root — create a symlink there
ln -s "$GITHUB_WORKSPACE/workflow-ui-dep" "$GITHUB_WORKSPACE/../workflow-ui"
- name: Install
run: cd ui && npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: cd ui && npm run build
- name: Test
run: cd ui && npm test -- --run