From b8c84af6eda85737b66256867c6ab8ae79015561 Mon Sep 17 00:00:00 2001 From: Jefferson Date: Tue, 27 Feb 2024 14:46:19 -0500 Subject: [PATCH] ci: Add Nsolid CI and Integration tests as separate pipelines Signed-off-by: Jefferson ci: Add Nsolid CI and Integration --- .github/workflows/ci-nsolid.yml | 124 +++++++++++++++++++++++ .github/workflows/integration-nsolid.yml | 60 +++++++++++ docs/Reference/LTS.md | 30 +++--- 3 files changed, 202 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/ci-nsolid.yml create mode 100644 .github/workflows/integration-nsolid.yml diff --git a/.github/workflows/ci-nsolid.yml b/.github/workflows/ci-nsolid.yml new file mode 100644 index 00000000000..b8391200e06 --- /dev/null +++ b/.github/workflows/ci-nsolid.yml @@ -0,0 +1,124 @@ +name: ci NSolid + +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: + nsolid-version: [5] + os: [macos-latest, ubuntu-latest, windows-latest] + include: + - nsolid-version: 5 + node-version: 18 + - nsolid-version: 5 + node-version: 20 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: nodesource/setup-nsolid@v1 + 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 }} diff --git a/.github/workflows/integration-nsolid.yml b/.github/workflows/integration-nsolid.yml new file mode 100644 index 00000000000..3aecd5bd895 --- /dev/null +++ b/.github/workflows/integration-nsolid.yml @@ -0,0 +1,60 @@ +name: integration NSolid + +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: + nsolid-version: [5] + os: [ubuntu-latest] + pnpm-version: [8] + include: + - nsolid-version: 5 + node-version: 18 + - nsolid-version: 5 + node-version: 20 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: nodesource/setup-nsolid@v1 + 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 diff --git a/docs/Reference/LTS.md b/docs/Reference/LTS.md index 880b63cd0c6..56956d05570 100644 --- a/docs/Reference/LTS.md +++ b/docs/Reference/LTS.md @@ -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 @@ -43,12 +49,12 @@ A "month" is defined as 30 consecutive days. ### Schedule -| 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 @@ -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.