Skip to content

Commit 43aa205

Browse files
committed
ci: Add Nsolid CI and Integration tests as separate pipelines
Signed-off-by: Jefferson <[email protected]> ci: Add Nsolid CI and Integration tests as separate pipelines
1 parent a033540 commit 43aa205

File tree

3 files changed

+203
-12
lines changed

3 files changed

+203
-12
lines changed

.github/workflows/ci-nsolid.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: ci NSolid
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- next
8+
- 'v*'
9+
paths-ignore:
10+
- 'docs/**'
11+
- '*.md'
12+
pull_request:
13+
paths-ignore:
14+
- 'docs/**'
15+
- '*.md'
16+
17+
# This allows a subsequently queued workflow run to interrupt previous runs
18+
concurrency:
19+
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
20+
cancel-in-progress: true
21+
22+
jobs:
23+
test-unit:
24+
runs-on: ${{ matrix.os }}
25+
permissions:
26+
contents: read
27+
strategy:
28+
matrix:
29+
node-version: [18, 20]
30+
os: [macos-latest, ubuntu-latest, windows-latest]
31+
include:
32+
- nsolid-version: 5
33+
node-version: 18
34+
- nsolid-version: 5
35+
node-version: 20
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
with:
40+
persist-credentials: false
41+
42+
- uses: nodesource/setup-nsolid@v1
43+
with:
44+
node-version: ${{ matrix.node-version }}
45+
nsolid-version: ${{ matrix.nsolid-version }}
46+
47+
- name: Install
48+
run: |
49+
npm install --ignore-scripts
50+
51+
- name: Run tests
52+
run: |
53+
npm run unit
54+
55+
test-typescript:
56+
runs-on: 'ubuntu-latest'
57+
permissions:
58+
contents: read
59+
60+
steps:
61+
- uses: actions/checkout@v4
62+
with:
63+
persist-credentials: false
64+
65+
- uses: nodesource/setup-nsolid@v1
66+
with:
67+
node-version: 20
68+
nsolid-version: 5
69+
70+
- name: Install
71+
run: |
72+
npm install --ignore-scripts
73+
74+
- name: Run typescript tests
75+
run: |
76+
npm run test:typescript
77+
env:
78+
NODE_OPTIONS: no-network-family-autoselection
79+
80+
package:
81+
needs:
82+
- test-typescript
83+
- test-unit
84+
runs-on: ubuntu-latest
85+
permissions:
86+
contents: read
87+
steps:
88+
- uses: actions/checkout@v4
89+
with:
90+
persist-credentials: false
91+
- uses: nodesource/setup-nsolid@v1
92+
with:
93+
nsolid-version: 5
94+
- name: install fastify
95+
run: |
96+
npm install --ignore-scripts
97+
- name: install webpack stack
98+
run: |
99+
cd test/bundler/webpack && npm install
100+
- name: Test webpack bundle
101+
run: |
102+
cd test/bundler/webpack && npm run test
103+
- name: install esbuild stack
104+
run: |
105+
cd test/bundler/esbuild && npm install
106+
- name: Test esbuild bundle
107+
run: |
108+
cd test/bundler/esbuild && npm run test
109+
110+
automerge:
111+
if: >
112+
github.event_name == 'pull_request' &&
113+
github.event.pull_request.user.login == 'dependabot[bot]'
114+
needs:
115+
- test-typescript
116+
- test-unit
117+
- package
118+
runs-on: ubuntu-latest
119+
permissions:
120+
pull-requests: write
121+
contents: write
122+
steps:
123+
- uses: fastify/github-action-merge-dependabot@v3
124+
with:
125+
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+
os: [ubuntu-latest]
27+
node-version: [18, 20]
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

docs/Reference/LTS.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ in this document:
2323
given Fastify release line. This implies that only the latest Node.js release
2424
of a given line is supported.
2525

26+
4. Major releases will be tested and verified against all [N|solid](https://doc
27+
s.nodesource.com/nsolid/5.0/docs) releases lines those released aligned with
28+
the [Node.js LTS policy](https://github.com/nodejs/Release) within the LTS
29+
period of that given Fastify release line. This implies that only the latest
30+
N|Solid release of a given line is supported.
31+
2632
A "month" is defined as 30 consecutive days.
2733

2834
> ## Security Releases and Semver
@@ -43,12 +49,12 @@ A "month" is defined as 30 consecutive days.
4349
### Schedule
4450
<a id="lts-schedule"></a>
4551

46-
| Version | Release Date | End Of LTS Date | Node.js |
47-
| :------ | :----------- | :-------------- | :------------------- |
48-
| 1.0.0 | 2018-03-06 | 2019-09-01 | 6, 8, 9, 10, 11 |
49-
| 2.0.0 | 2019-02-25 | 2021-01-31 | 6, 8, 10, 12, 14 |
50-
| 3.0.0 | 2020-07-07 | 2023-06-30 | 10, 12, 14, 16, 18 |
51-
| 4.0.0 | 2022-06-08 | TBD | 14, 16, 18, 20 |
52+
| Version | Release Date | End Of LTS Date | Node.js | Nsolid(Node) |
53+
| :------ | :----------- | :-------------- | :------------------- | :------------- |
54+
| 1.0.0 | 2018-03-06 | 2019-09-01 | 6, 8, 9, 10, 11 | |
55+
| 2.0.0 | 2019-02-25 | 2021-01-31 | 6, 8, 10, 12, 14 | |
56+
| 3.0.0 | 2020-07-07 | 2023-06-30 | 10, 12, 14, 16, 18 | v5(18) |
57+
| 4.0.0 | 2022-06-08 | TBD | 14, 16, 18, 20 | v5(18), v5(20) |
5258

5359
### CI tested operating systems
5460
<a id="supported-os"></a>
@@ -59,12 +65,12 @@ runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-gi
5965
for further details on what the latest virtual environment is in relation to the
6066
YAML workflow labels below:
6167

62-
| OS | YAML Workflow Label | Package Manager | Node.js |
63-
|---------|------------------------|---------------------------|--------------|
64-
| Linux | `ubuntu-latest` | npm | 14,16,18,20 |
65-
| Linux | `ubuntu-latest` | yarn,pnpm | 14,16,18,20 |
66-
| Windows | `windows-latest` | npm | 14,16,18,20 |
67-
| MacOS | `macos-latest` | npm | 14,16,18,20 |
68+
| OS | YAML Workflow Label | Package Manager | Node.js | Nsolid(Node) |
69+
|---------|------------------------|---------------------------|--------------|----------------|
70+
| Linux | `ubuntu-latest` | npm | 14,16,18,20 | v5(18),v5(20) |
71+
| Linux | `ubuntu-latest` | yarn,pnpm | 14,16,18,20 | v5(18),v5(20) |
72+
| Windows | `windows-latest` | npm | 14,16,18,20 | v5(18),v5(20) |
73+
| MacOS | `macos-latest` | npm | 14,16,18,20 | v5(18),v5(20) |
6874

6975
Using [yarn](https://yarnpkg.com/) might require passing the `--ignore-engines`
7076
flag.

0 commit comments

Comments
 (0)