-
Notifications
You must be signed in to change notification settings - Fork 23
156 lines (127 loc) · 3.68 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
name: CI (build, lint, test)
# All pull requests, and
# Workflow dispatch allows you to run this workflow manually from the Actions tab
on:
pull_request:
workflow_dispatch:
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
CI: true
jobs:
build:
name: Build & unit test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
show-progress: false
- name: Runner setup
uses: ./.github/actions/runner-setup
- name: Install rust dependencies
run: |
sudo apt-get update
sudo apt-get install libgtk-3-dev libsoup2.4-dev javascriptcoregtk-4.1
- name: Lint monorepo root
run: pnpm run lint
- name: Build, lint, test all packages
run: pnpm turbo lint build test
integration-tests:
name: INT - ${{ matrix.package }}
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
[
'@kadena/client',
'@kadena/client-utils',
'@kadena/create-kadena-app',
]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
show-progress: false
- name: Runner Setup
uses: ./.github/actions/runner-setup
- name: Setup Kadena sandbox
uses: ./.github/actions/sandbox
- name: run integration tests
run: pnpm run test:integration --filter ${{ matrix.package }}
end-to-end-tests:
name: E2E - ${{ matrix.app }}
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
app: ['tools', 'docs', 'graph']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
show-progress: false
- name: Runner Setup
uses: ./.github/actions/runner-setup
- name: Setup Kadena sandbox
uses: ./.github/actions/sandbox
- name: Build App with NODE_ENV=test
uses: ./.github/actions/build-app-e2e
with:
app: ${{ matrix.app }}
- name: Run end-to-end tests
uses: ./.github/actions/end-to-end-tests
with:
app: ${{ matrix.app }}
- name: Archive sandbox logs
uses: ./.github/actions/archive-logs
if: always()
with:
test-object: ${{ matrix.app }}
- name: Teardown kadena sandbox
if: always()
run: docker compose down
working-directory: .github/actions/sandbox
- name: Archive volumes
uses: ./.github/actions/archive-volumes
if: always()
with:
test-object: ${{ matrix.app }}
- name: Upload Blob Report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: blob-report-${{ matrix.app }}
path: packages/e2e/e2e-${{ matrix.app }}/blob-report/
retention-days: 1
merge-publish-reports:
if: ${{ !cancelled() }}
needs: [end-to-end-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
show-progress: false
- name: Runner Setup
uses: ./.github/actions/runner-setup
- name: Merge & Publish Report
uses: ./.github/actions/merge-publish-reports
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ci-gate:
if: always()
needs:
- build
- integration-tests
- end-to-end-tests
- merge-publish-reports
runs-on: Ubuntu-latest
steps:
- name: Check required jobs.
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}