-
Notifications
You must be signed in to change notification settings - Fork 116
163 lines (142 loc) · 4.04 KB
/
test-install-nitro-node.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
158
159
160
161
162
163
name: Test install nitro-node
on:
#schedule:
# - cron: "0 20 * * *" # At 8 PM UTC, which is 3 AM UTC+7
push:
branches:
- main
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
paths:
- ".github/scripts/e2e-test-install-nitro-node.js"
- ".github/workflows/test-install-nitro-node.yml"
- "nitro-node/**"
pull_request:
types: [opened, synchronize, reopened]
paths:
- ".github/scripts/e2e-test-install-nitro-node.js"
- ".github/workflows/test-install-nitro-node.yml"
- "nitro-node/**"
workflow_dispatch:
jobs:
linux-pack-tarball:
runs-on: ubuntu-latest
outputs:
tarball-url: ${{ steps.upload.outputs.artifact-url }}
steps:
- name: Clone
id: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Build tarball
id: build
run: |
cd nitro-node
make pack
find . -type f -name 'janhq-nitro-node-*.tgz' -exec mv {} janhq-nitro-node.tgz \;
- name: Upload tarball as artifact
id: upload
uses: actions/upload-artifact@master
with:
name: janhq-nitro-node
path: nitro-node/janhq-nitro-node.tgz
if-no-files-found: error
ubuntu-install:
runs-on: ubuntu-latest
needs: [linux-pack-tarball]
if: always() && needs.linux-pack-tarball.result == 'success'
steps:
- name: Clone
id: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Download prebuilt tarball
uses: actions/download-artifact@master
with:
name: janhq-nitro-node
path: .github/scripts/
- name: List tarball content
id: tar-tf
run: |
cd .github
cd scripts
tar tf janhq-nitro-node.tgz
- name: Run tests
id: test_install_nitro_node
env:
NITRO_NODE_PKG: ${{ github.workspace }}/.github/scripts/janhq-nitro-node.tgz
run: |
cd .github
cd scripts
node e2e-test-install-nitro-node.js
macOS-install:
runs-on: macos-latest
needs: [linux-pack-tarball]
if: always() && needs.linux-pack-tarball.result == 'success'
steps:
- name: Clone
id: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Download prebuilt tarball
uses: actions/download-artifact@master
with:
name: janhq-nitro-node
path: .github/scripts/
- name: List tarball content
id: tar-tf
run: |
cd .github
cd scripts
tar tf janhq-nitro-node.tgz
- name: Run tests
id: test_install_nitro_node
env:
NITRO_NODE_PKG: ${{ github.workspace }}/.github/scripts/janhq-nitro-node.tgz
run: |
cd .github
cd scripts
node e2e-test-install-nitro-node.js
windows-install:
runs-on: windows-latest
needs: [linux-pack-tarball]
if: always() && needs.linux-pack-tarball.result == 'success'
steps:
- name: Clone
id: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Download prebuilt tarball
uses: actions/download-artifact@master
with:
name: janhq-nitro-node
path: .github/scripts/
- name: List tarball content
id: tar-tf
run: |
cd .github
cd scripts
tar tf janhq-nitro-node.tgz
- name: Run tests
id: test_install_nitro_node
env:
NITRO_NODE_PKG: ${{ github.workspace }}\.github\scripts\janhq-nitro-node.tgz
run: |
cd .github
cd scripts
node e2e-test-install-nitro-node.js