diff --git a/templates/basic/.github/workflows/main.yml b/templates/basic/.github/workflows/main.yml index 182554c6a..535e4b7c9 100644 --- a/templates/basic/.github/workflows/main.yml +++ b/templates/basic/.github/workflows/main.yml @@ -2,16 +2,22 @@ name: CI on: [push] jobs: build: - runs-on: ubuntu-latest + name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} + + runs-on: ${{ matrix.os }} + strategy: + matrix: + node: ['10.x', '12.x', '14.x'] + os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - name: Begin CI... + - name: Checkout repo uses: actions/checkout@v2 - - name: Use Node 12 + - name: Use Node ${{ matrix.node }} uses: actions/setup-node@v1 with: - node-version: 12.x + node-version: ${{ matrix.node }} - name: Install deps and build (with cache) uses: bahmutov/npm-install@v1 diff --git a/templates/basic/README.md b/templates/basic/README.md index 0e115bfd2..93eb55df4 100644 --- a/templates/basic/README.md +++ b/templates/basic/README.md @@ -63,7 +63,7 @@ TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rol Two actions are added by default: -- `main` which installs deps w/ cache, lints, tests, and builds on all pushes +- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix - `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit) ## Optimizations diff --git a/templates/react-with-storybook/.github/workflows/main.yml b/templates/react-with-storybook/.github/workflows/main.yml index 182554c6a..535e4b7c9 100644 --- a/templates/react-with-storybook/.github/workflows/main.yml +++ b/templates/react-with-storybook/.github/workflows/main.yml @@ -2,16 +2,22 @@ name: CI on: [push] jobs: build: - runs-on: ubuntu-latest + name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} + + runs-on: ${{ matrix.os }} + strategy: + matrix: + node: ['10.x', '12.x', '14.x'] + os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - name: Begin CI... + - name: Checkout repo uses: actions/checkout@v2 - - name: Use Node 12 + - name: Use Node ${{ matrix.node }} uses: actions/setup-node@v1 with: - node-version: 12.x + node-version: ${{ matrix.node }} - name: Install deps and build (with cache) uses: bahmutov/npm-install@v1 diff --git a/templates/react-with-storybook/README.md b/templates/react-with-storybook/README.md index f5e0dd69a..134273f32 100644 --- a/templates/react-with-storybook/README.md +++ b/templates/react-with-storybook/README.md @@ -103,7 +103,7 @@ TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rol Two actions are added by default: -- `main` which runs installs deps w/ cache, lints, tests, and builds on all pushes +- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix - `size` which comments cost comparison of your library on every pull request using [size-limit](https://github.com/ai/size-limit) ## Optimizations diff --git a/templates/react/.github/workflows/main.yml b/templates/react/.github/workflows/main.yml index 182554c6a..535e4b7c9 100644 --- a/templates/react/.github/workflows/main.yml +++ b/templates/react/.github/workflows/main.yml @@ -2,16 +2,22 @@ name: CI on: [push] jobs: build: - runs-on: ubuntu-latest + name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} + + runs-on: ${{ matrix.os }} + strategy: + matrix: + node: ['10.x', '12.x', '14.x'] + os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - name: Begin CI... + - name: Checkout repo uses: actions/checkout@v2 - - name: Use Node 12 + - name: Use Node ${{ matrix.node }} uses: actions/setup-node@v1 with: - node-version: 12.x + node-version: ${{ matrix.node }} - name: Install deps and build (with cache) uses: bahmutov/npm-install@v1 diff --git a/templates/react/README.md b/templates/react/README.md index 1f020dd28..1db53ccd9 100644 --- a/templates/react/README.md +++ b/templates/react/README.md @@ -82,8 +82,8 @@ TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rol Two actions are added by default: -- `main` which runs installs deps w/ cache, lints, tests, and builds on all pushes -- `size` which comments cost comparison of your library on every pull request using +- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix +- `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit) ## Optimizations