Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add Nsolid runtime to CI and Integration tests #5332 #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .github/workflows/ci-alternative-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: ci Alternative Runtimes

on:
push:
branches:
- main
- next
- 'v*'
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
test-unit:
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
node-version: [18, 20]
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- runtime: nsolid
node-version: 18
nsolid-version: 5
- runtime: nsolid
node-version: 20
nsolid-version: 5
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: nodesource/setup-nsolid@v1
if: ${{ matrix.runtime == 'nsolid' }}
with:
node-version: ${{ matrix.node-version }}
nsolid-version: ${{ matrix.nsolid-version }}

- name: Install
run: |
npm install --ignore-scripts

- name: Run tests
run: |
npm run unit

test-typescript:
runs-on: 'ubuntu-latest'
permissions:
contents: read

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: nodesource/setup-nsolid@v1
with:
node-version: 20
nsolid-version: 5

- name: Install
run: |
npm install --ignore-scripts

- name: Run typescript tests
run: |
npm run test:typescript
env:
NODE_OPTIONS: no-network-family-autoselection

package:
needs:
- test-typescript
- test-unit
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: nodesource/setup-nsolid@v1
with:
nsolid-version: 5
- name: install fastify
run: |
npm install --ignore-scripts
- name: install webpack stack
run: |
cd test/bundler/webpack && npm install
- name: Test webpack bundle
run: |
cd test/bundler/webpack && npm run test
- name: install esbuild stack
run: |
cd test/bundler/esbuild && npm install
- name: Test esbuild bundle
run: |
cd test/bundler/esbuild && npm run test

automerge:
if: >
github.event_name == 'pull_request' &&
github.event.pull_request.user.login == 'dependabot[bot]'
needs:
- test-typescript
- test-unit
- package
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
64 changes: 64 additions & 0 deletions .github/workflows/integration-alternative-runtimes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: integration Alternative Runtimes

on:
push:
branches:
- main
- master
- next
- 'v*'
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'

jobs:
install-production:
runs-on: ${{ matrix.os }}
permissions:
contents: read

strategy:
matrix:
os: [ubuntu-latest]
runtime: [nsolid]
node-version: [18, 20]
pnpm-version: [8]
include:
- nsolid-version: 5
node-version: 18
runtime: nsolid
- nsolid-version: 5
node-version: 20
runtime: nsolid
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: nodesource/setup-nsolid@v1
if: ${{ matrix.runtime == 'nsolid' }}
with:
node-version: ${{ matrix.node-version }}
nsolid-version: ${{ matrix.nsolid-version }}

- name: Install Pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ matrix.pnpm-version }}

- name: Install Production
run: |
pnpm install --prod

- name: Run server
run: |
node integration/server.js &

- name: Test
if: ${{ success() }}
run: |
bash integration/test.sh
30 changes: 18 additions & 12 deletions docs/Reference/LTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ in this document:
given Fastify release line. This implies that only the latest Node.js release
of a given line is supported.

4. Major releases will be tested and verified against all [N|solid](https://doc
s.nodesource.com/nsolid/5.0/docs) releases lines those released aligned with
the [Node.js LTS policy](https://github.com/nodejs/Release) within the LTS
period of that given Fastify release line. This implies that only the latest
N|Solid release of a given line is supported.

A "month" is defined as 30 consecutive days.

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

| Version | Release Date | End Of LTS Date | Node.js |
| :------ | :----------- | :-------------- | :------------------- |
| 1.0.0 | 2018-03-06 | 2019-09-01 | 6, 8, 9, 10, 11 |
| 2.0.0 | 2019-02-25 | 2021-01-31 | 6, 8, 10, 12, 14 |
| 3.0.0 | 2020-07-07 | 2023-06-30 | 10, 12, 14, 16, 18 |
| 4.0.0 | 2022-06-08 | TBD | 14, 16, 18, 20 |
| Version | Release Date | End Of LTS Date | Node.js | Nsolid(Node) |
| :------ | :----------- | :-------------- | :------------------- | :------------- |
| 1.0.0 | 2018-03-06 | 2019-09-01 | 6, 8, 9, 10, 11 | |
| 2.0.0 | 2019-02-25 | 2021-01-31 | 6, 8, 10, 12, 14 | |
| 3.0.0 | 2020-07-07 | 2023-06-30 | 10, 12, 14, 16, 18 | v5(18) |
| 4.0.0 | 2022-06-08 | TBD | 14, 16, 18, 20 | v5(18), v5(20) |

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

| OS | YAML Workflow Label | Package Manager | Node.js |
|---------|------------------------|---------------------------|--------------|
| Linux | `ubuntu-latest` | npm | 14,16,18,20 |
| Linux | `ubuntu-latest` | yarn,pnpm | 14,16,18,20 |
| Windows | `windows-latest` | npm | 14,16,18,20 |
| MacOS | `macos-latest` | npm | 14,16,18,20 |
| OS | YAML Workflow Label | Package Manager | Node.js | Nsolid(Node) |
|---------|------------------------|---------------------------|--------------|----------------|
| Linux | `ubuntu-latest` | npm | 14,16,18,20 | v5(18),v5(20) |
| Linux | `ubuntu-latest` | yarn,pnpm | 14,16,18,20 | v5(18),v5(20) |
| Windows | `windows-latest` | npm | 14,16,18,20 | v5(18),v5(20) |
| MacOS | `macos-latest` | npm | 14,16,18,20 | v5(18),v5(20) |

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