Skip to content

Commit b8c84af

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
1 parent a033540 commit b8c84af

File tree

3 files changed

+202
-12
lines changed

3 files changed

+202
-12
lines changed

.github/workflows/ci-nsolid.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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+
nsolid-version: [5]
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+
steps:
37+
- uses: actions/checkout@v4
38+
with:
39+
persist-credentials: false
40+
41+
- uses: nodesource/setup-nsolid@v1
42+
with:
43+
node-version: ${{ matrix.node-version }}
44+
nsolid-version: ${{ matrix.nsolid-version }}
45+
46+
- name: Install
47+
run: |
48+
npm install --ignore-scripts
49+
50+
- name: Run tests
51+
run: |
52+
npm run unit
53+
54+
test-typescript:
55+
runs-on: 'ubuntu-latest'
56+
permissions:
57+
contents: read
58+
59+
steps:
60+
- uses: actions/checkout@v4
61+
with:
62+
persist-credentials: false
63+
64+
- uses: nodesource/setup-nsolid@v1
65+
with:
66+
node-version: 20
67+
nsolid-version: 5
68+
69+
- name: Install
70+
run: |
71+
npm install --ignore-scripts
72+
73+
- name: Run typescript tests
74+
run: |
75+
npm run test:typescript
76+
env:
77+
NODE_OPTIONS: no-network-family-autoselection
78+
79+
package:
80+
needs:
81+
- test-typescript
82+
- test-unit
83+
runs-on: ubuntu-latest
84+
permissions:
85+
contents: read
86+
steps:
87+
- uses: actions/checkout@v4
88+
with:
89+
persist-credentials: false
90+
- uses: nodesource/setup-nsolid@v1
91+
with:
92+
nsolid-version: 5
93+
- name: install fastify
94+
run: |
95+
npm install --ignore-scripts
96+
- name: install webpack stack
97+
run: |
98+
cd test/bundler/webpack && npm install
99+
- name: Test webpack bundle
100+
run: |
101+
cd test/bundler/webpack && npm run test
102+
- name: install esbuild stack
103+
run: |
104+
cd test/bundler/esbuild && npm install
105+
- name: Test esbuild bundle
106+
run: |
107+
cd test/bundler/esbuild && npm run test
108+
109+
automerge:
110+
if: >
111+
github.event_name == 'pull_request' &&
112+
github.event.pull_request.user.login == 'dependabot[bot]'
113+
needs:
114+
- test-typescript
115+
- test-unit
116+
- package
117+
runs-on: ubuntu-latest
118+
permissions:
119+
pull-requests: write
120+
contents: write
121+
steps:
122+
- uses: fastify/github-action-merge-dependabot@v3
123+
with:
124+
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

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)