-
Notifications
You must be signed in to change notification settings - Fork 97
145 lines (106 loc) · 3.2 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
name: ci
on: [push, pull_request]
jobs:
tests1:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Node version 🖨️
run: node -v
- name: NPM install
uses: bahmutov/npm-install@v1
- name: Run tests 🧪
run: npm test
- name: Run demo 1 📊
run: npm run demo
- name: Run demo 2 📊
run: npm run demo2
- name: Run demo 3 📊
run: npm run demo3
- name: Run demo 4 📊
run: npm run demo4
- name: Run demo 5 📊
run: npm run demo5
- name: Run demo 6 📊
run: npm run demo6
- name: Run demo 7 📊
run: npm run demo7
tests2:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Node version 🖨️
run: node -v
- name: NPM install
uses: bahmutov/npm-install@v1
# hmm why are some demos skipped?
- name: Run demo 11 📊
run: npm run demo11
- name: Run demo 12 📊
run: npm run demo12
- name: Run demo 9 📊
run: START_SERVER_AND_TEST_INSECURE=1 npm run demo9
- name: Run demo cross env 📊
run: npm run demo-cross-env
- name: Run demo commands 📊
run: npm run demo-commands
- name: Run demo multiple 📊
run: npm run demo-multiple
- name: Run demo expect 403 code 📊
run: npm run demo-expect-403
tests-node-v16:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Node version 🖨️
run: node -v
- name: NPM install
uses: bahmutov/npm-install@v1
- name: Run json-server test
run: npm run demo-json-server
- name: Run explicit 0.0.0.0 host example
run: npm run demo-zero-explicit
- name: Run 0.0.0.0 host with 127.0.0.1 url
run: npm run demo-zero-127
- name: Run 0.0.0.0 host example
run: npm run demo-zero
tests-node-v18:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Node version 🖨️
run: node -v
- name: NPM install
uses: bahmutov/npm-install@v1
- name: Run json-server test
run: npm run demo-json-server
- name: Run ::1 host example
run: npm run demo-ip6
- name: Run explicit 0.0.0.0 host example
run: npm run demo-zero-explicit
- name: Run 0.0.0.0 host with 127.0.0.1 url
run: npm run demo-zero-127
- name: Run 0.0.0.0 host example
run: npm run demo-zero
release:
needs: ['tests1', 'tests2', 'tests-node-v16', 'tests-node-v18']
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Semantic Release 🚀
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}