Skip to content

Commit 1b209c9

Browse files
committed
chore: Separate Nsolid CI
Signed-off-by: Jefferson <[email protected]>
1 parent 66123eb commit 1b209c9

File tree

4 files changed

+276
-37
lines changed

4 files changed

+276
-37
lines changed

.github/workflows/ci-nsolid.yml

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- next
9+
- 'v*'
10+
paths-ignore:
11+
- 'docs/**'
12+
- '*.md'
13+
pull_request:
14+
paths-ignore:
15+
- 'docs/**'
16+
- '*.md'
17+
18+
# This allows a subsequently queued workflow run to interrupt previous runs
19+
concurrency:
20+
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
21+
cancel-in-progress: true
22+
23+
jobs:
24+
dependency-review:
25+
name: Dependency Review
26+
if: github.event_name == 'pull_request'
27+
runs-on: ubuntu-latest
28+
permissions:
29+
contents: read
30+
steps:
31+
- name: Check out repo
32+
uses: actions/checkout@v4
33+
with:
34+
persist-credentials: false
35+
36+
- name: Dependency review
37+
uses: actions/dependency-review-action@v4
38+
39+
check-licenses:
40+
name: Check licenses
41+
runs-on: ubuntu-latest
42+
permissions:
43+
contents: read
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
persist-credentials: false
48+
49+
- name: Use Node.js
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: 'lts/*'
53+
cache: 'npm'
54+
cache-dependency-path: package.json
55+
56+
- name: Install
57+
run: |
58+
npm install --ignore-scripts
59+
60+
- name: Check licenses
61+
run: |
62+
npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;"
63+
64+
lint:
65+
name: Lint
66+
runs-on: ubuntu-latest
67+
permissions:
68+
contents: read
69+
steps:
70+
- uses: actions/checkout@v4
71+
with:
72+
persist-credentials: false
73+
74+
- name: Use Node.js
75+
uses: actions/setup-node@v4
76+
with:
77+
node-version: 'lts/*'
78+
cache: 'npm'
79+
cache-dependency-path: package.json
80+
81+
- name: Install
82+
run: |
83+
npm install --ignore-scripts
84+
85+
- name: Lint code
86+
run: |
87+
npm run lint
88+
89+
coverage-nix:
90+
needs: lint
91+
permissions:
92+
contents: read
93+
uses: ./.github/workflows/coverage-nix.yml
94+
95+
coverage-win:
96+
needs: lint
97+
permissions:
98+
contents: read
99+
uses: ./.github/workflows/coverage-win.yml
100+
101+
test-unit:
102+
needs:
103+
- lint
104+
- coverage-nix
105+
- coverage-win
106+
runs-on: ${{ matrix.os }}
107+
permissions:
108+
contents: read
109+
strategy:
110+
matrix:
111+
nsolid-version: [5]
112+
os: [macos-latest, ubuntu-latest, windows-latest]
113+
include:
114+
- nsolid-version: 5
115+
node-version: 18
116+
- nsolid-version: 5
117+
node-version: 20
118+
steps:
119+
- uses: actions/checkout@v4
120+
with:
121+
persist-credentials: false
122+
123+
- uses: nodesource/setup-nsolid@v1
124+
with:
125+
node-version: ${{ matrix.node-version }}
126+
nsolid-version: ${{ matrix.nsolid-version }}
127+
128+
- name: Install
129+
run: |
130+
npm install --ignore-scripts
131+
132+
- name: Run tests
133+
run: |
134+
npm run unit
135+
136+
test-typescript:
137+
needs:
138+
- lint
139+
- coverage-nix
140+
- coverage-win
141+
runs-on: 'ubuntu-latest'
142+
permissions:
143+
contents: read
144+
145+
steps:
146+
- uses: actions/checkout@v4
147+
with:
148+
persist-credentials: false
149+
150+
- uses: nodesource/setup-nsolid@v1
151+
with:
152+
node-version: 20
153+
nsolid-version: 5
154+
155+
- name: Install
156+
run: |
157+
npm install --ignore-scripts
158+
159+
- name: Run typescript tests
160+
run: |
161+
npm run test:typescript
162+
env:
163+
NODE_OPTIONS: no-network-family-autoselection
164+
165+
package:
166+
needs:
167+
- test-typescript
168+
- test-unit
169+
runs-on: ubuntu-latest
170+
permissions:
171+
contents: read
172+
steps:
173+
- uses: actions/checkout@v4
174+
with:
175+
persist-credentials: false
176+
- uses: nodesource/setup-nsolid@v1
177+
with:
178+
nsolid-version: 5
179+
- name: install fastify
180+
run: |
181+
npm install --ignore-scripts
182+
- name: install webpack stack
183+
run: |
184+
cd test/bundler/webpack && npm install
185+
- name: Test webpack bundle
186+
run: |
187+
cd test/bundler/webpack && npm run test
188+
- name: install esbuild stack
189+
run: |
190+
cd test/bundler/esbuild && npm install
191+
- name: Test esbuild bundle
192+
run: |
193+
cd test/bundler/esbuild && npm run test
194+
195+
automerge:
196+
if: >
197+
github.event_name == 'pull_request' &&
198+
github.event.pull_request.user.login == 'dependabot[bot]'
199+
needs:
200+
- test-typescript
201+
- test-unit
202+
- package
203+
runs-on: ubuntu-latest
204+
permissions:
205+
pull-requests: write
206+
contents: write
207+
steps:
208+
- uses: fastify/github-action-merge-dependabot@v3
209+
with:
210+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ci
1+
name: ci NSolid
22

33
on:
44
push:
@@ -109,39 +109,24 @@ jobs:
109109

110110
strategy:
111111
matrix:
112-
runtime: [node, nsolid]
113112
node-version: [14, 16, 18, 20]
114113
os: [macos-latest, ubuntu-latest, windows-latest]
115-
include:
116-
- runtime: nsolid
117-
nsolid-version: 5
118114
exclude:
119-
# excludes node 14 on Windows
115+
# excludes node 14 on Windows
120116
- os: windows-latest
121-
runtime: node
122117
node-version: 14
123-
# Nsolid 5 does not support Node.js 14, 16
124-
- runtime: nsolid
125-
node-version: 14
126-
- runtime: nsolid
127-
node-version: 16
118+
128119
steps:
129120
- uses: actions/checkout@v4
130121
with:
131122
persist-credentials: false
132123

133124
- name: Use Node.js
134-
if: ${{ matrix.runtime == 'node'}}
135125
uses: actions/setup-node@v4
136126
with:
137127
node-version: ${{ matrix.node-version }}
138128
cache: 'npm'
139129
cache-dependency-path: package.json
140-
- uses: nodesource/setup-nsolid@v1
141-
if: ${{ matrix.runtime == 'nsolid'}}
142-
with:
143-
node-version: ${{ matrix.node-version }}
144-
nsolid-version: ${{ matrix.nsolid-version }}
145130

146131
- name: Install
147132
run: |
@@ -229,4 +214,4 @@ jobs:
229214
steps:
230215
- uses: fastify/github-action-merge-dependabot@v3
231216
with:
232-
github-token: ${{ secrets.GITHUB_TOKEN }}
217+
github-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: integration NSolid
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- next
9+
- 'v*'
10+
paths-ignore:
11+
- 'docs/**'
12+
- '*.md'
13+
pull_request:
14+
paths-ignore:
15+
- 'docs/**'
16+
- '*.md'
17+
18+
jobs:
19+
install-production:
20+
runs-on: ${{ matrix.os }}
21+
permissions:
22+
contents: read
23+
24+
strategy:
25+
matrix:
26+
nsolid-version: [5]
27+
os: [ubuntu-latest]
28+
pnpm-version: [8]
29+
include:
30+
- nsolid-version: 5
31+
node-version: 18
32+
- nsolid-version: 5
33+
node-version: 20
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
persist-credentials: false
38+
39+
- uses: nodesource/setup-nsolid@v1
40+
with:
41+
node-version: ${{ matrix.node-version }}
42+
nsolid-version: ${{ matrix.nsolid-version }}
43+
44+
- name: Install Pnpm
45+
uses: pnpm/action-setup@v2
46+
with:
47+
version: ${{ matrix.pnpm-version }}
48+
49+
- name: Install Production
50+
run: |
51+
pnpm install --prod
52+
53+
- name: Run server
54+
run: |
55+
node integration/server.js &
56+
57+
- name: Test
58+
if: ${{ success() }}
59+
run: |
60+
bash integration/test.sh

.github/workflows/integration.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,25 @@ jobs:
2323

2424
strategy:
2525
matrix:
26-
runtime: [node, nsolid]
2726
node-version: [16, 18, 20]
2827
os: [ubuntu-latest]
2928
pnpm-version: [8]
3029
# pnpm@8 does not support Node.js 14 so include it separately
3130
include:
32-
- runtime: nsolid
33-
nsolid-version: 5
34-
- runtime: node
35-
node-version: 14
31+
- node-version: 14
3632
os: ubuntu-latest
3733
pnpm-version: 7
38-
# Nsolid 5 does not support Node.js 14, 16
39-
exclude:
40-
- runtime: nsolid
41-
node-version: 16
42-
4334

4435
steps:
4536
- uses: actions/checkout@v4
4637
with:
4738
persist-credentials: false
4839

4940
- name: Use Node.js
50-
if: ${{ matrix.runtime == 'node'}}
5141
uses: actions/setup-node@v4
5242
with:
5343
node-version: ${{ matrix.node-version }}
5444

55-
- uses: nodesource/setup-nsolid@v1
56-
if: ${{ matrix.runtime == 'nsolid'}}
57-
with:
58-
node-version: ${{ matrix.node-version }}
59-
nsolid-version: ${{ matrix.nsolid-version }}
60-
6145
- name: Install Pnpm
6246
uses: pnpm/action-setup@v2
6347
with:
@@ -74,4 +58,4 @@ jobs:
7458
- name: Test
7559
if: ${{ success() }}
7660
run: |
77-
bash integration/test.sh
61+
bash integration/test.sh

0 commit comments

Comments
 (0)