Skip to content

Commit

Permalink
ci: run tests against Node.js Maintenance LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdbd committed Sep 14, 2022
1 parent 6f1a55a commit d0e2320
Show file tree
Hide file tree
Showing 10 changed files with 2,345 additions and 4,349 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
# pick at least one Node.js `lts` version and the `current` version (i.e. the latest Node.js version available)
# Test all packages with:
# 1. Maintenance LTS 14.20.0
# 2. Active LTS
# 3. Current (i.e. the latest Node.js version available)
# https://nodejs.org/en/
node: ['16.15.1', 'current']
# https://nodejs.org/en/about/releases/
node: ['16.17.0', 'current']
eleventy: ['1.0.0']
steps:
- name: 🛎️ Checkout repo
uses: actions/checkout@v3
Expand All @@ -28,6 +33,9 @@ jobs:

- name: ⬇️ Install dependencies
run: npm ci

- name: ⬇️ Install Eleventy ${{ matrix.eleventy }}
run: npm install @11ty/eleventy@${{ matrix.eleventy }}

- name: 🛡️ Audit dependencies (audit-level high)
# https://docs.npmjs.com/cli/v8/commands/npm-audit#audit-level
Expand Down Expand Up @@ -57,6 +65,6 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: false
# fail_ci_if_error: true
# fail_ci_if_error: false
fail_ci_if_error: true
verbose: true
8 changes: 5 additions & 3 deletions .github/workflows/release-to-npmjs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: 'release-to-npmjs'
name: 'Release to npmjs.com'

on:
pull_request:
push:
branches:
- canary
Expand All @@ -14,7 +13,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: ['16.15.1']
# Use the Active LTS for this workflow
# https://nodejs.org/en/
# https://nodejs.org/en/about/releases/
node: ['16.17.0']
steps:
- name: 🛎️ Checkout repo
uses: actions/checkout@v3
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# undici 🕚

![CI workflow](https://github.com/jackdbd/undici/actions/workflows/ci.yaml/badge.svg)
![release workflow](https://github.com/jackdbd/undici/actions/workflows/release.yaml/badge.svg)
![Release to npmjs.com workflow](https://github.com/jackdbd/undici/actions/workflows/release-to-npmjs.yaml/badge.svg)
[![codecov](https://codecov.io/gh/jackdbd/undici/branch/main/graph/badge.svg?token=P5uJ3doRer)](https://codecov.io/gh/jackdbd/undici)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)

Expand All @@ -11,7 +11,9 @@ Monorepo for my [Eleventy](https://www.11ty.dev/) plugins.
>
> All libraries of this monorepo are published to npmjs as CommonJS.
>
> At the moment no one of these packages has a ESM build.
> At the moment none of these packages has a ESM build.
>
> See also:
>
> - [Eleventy issue #836](https://github.com/11ty/eleventy/issues/836)
Expand Down Expand Up @@ -66,7 +68,8 @@ Build all libraries and the demo site, both in watch mode, and serve the demo si
```sh
npm run dev
```
Note: you will still need to refresh the browser.

Note: you will still need to refresh the browser (this might change when [Eleventy 2.0 will add a dev server](https://www.11ty.dev/docs/watch-serve/)).

## Test

Expand Down
6 changes: 3 additions & 3 deletions config/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
// https://www.typescriptlang.org/tsconfig#isolatedModules
"isolatedModules": true,

// Leave "lib" empty here, and define it in the tsconfig of each package, so
// it's more explicit.
// https://www.typescriptlang.org/tsconfig#lib
"lib": [],
// Check Node.js ES2020 Support and Node.js ES2021 Support here:
// https://node.green/
"lib": ["ES2020"],

// All of the libraries of this monorepo are compiled for CJS (no ESM).
// https://www.typescriptlang.org/tsconfig#module
Expand Down
Loading

0 comments on commit d0e2320

Please sign in to comment.