Skip to content

Commit

Permalink
ci: switch ci to test matrix (#3748)
Browse files Browse the repository at this point in the history
  • Loading branch information
joberstein authored Nov 9, 2023
1 parent ccb190a commit f33be70
Showing 1 changed file with 12 additions and 64 deletions.
76 changes: 12 additions & 64 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,77 +8,25 @@ on:
types: [opened, synchronize]

jobs:
v18:
runs-on: ubuntu-22.04
container:
image: 'ubuntu:22.04'
build:
strategy:
matrix:
os: [ubuntu-22.04, windows-2022]
node: [18, 20]
runs-on: ${{ matrix.os }}
steps:
- name: Install required dependencies
run: |
apt update
apt install --yes sudo
sudo apt install --yes git
sudo apt install --yes curl
curl --location https://deb.nodesource.com/setup_18.x | sudo --preserve-env bash -
sudo DEBIAN_FRONTEND=noninteractive apt install --yes nodejs
- uses: actions/checkout@v4
# workaround for https://github.com/actions/runner/issues/2033
- name: ownership workaround
run: git config --global --add safe.directory '*'
- name: Install yarn
run: |
npm install --global yarn
node --version
yarn global add yarn@latest
- name: Install dependencies
run: yarn install --ignore-engines --frozen-lockfile
- name: Build packages
run: yarn build
- name: Test
run: yarn test-ci

v20:
runs-on: ubuntu-22.04
container:
image: 'ubuntu:22.04'
steps:
- name: Install required dependencies
run: |
apt update
apt install --yes sudo
sudo apt install --yes git
sudo apt install --yes curl
curl --location https://deb.nodesource.com/setup_20.x | sudo --preserve-env bash -
sudo DEBIAN_FRONTEND=noninteractive apt install --yes nodejs
- uses: actions/checkout@v4
# workaround for https://github.com/actions/runner/issues/2033
- name: ownership workaround
run: git config --global --add safe.directory '*'
- name: Install yarn
run: |
npm install --global yarn
node --version
yarn global add yarn@latest
- name: Install dependencies
run: yarn install --ignore-engines --frozen-lockfile
- name: Build packages
run: yarn build
- name: Test
run: yarn test-ci

windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
max_attempts: 3
- name: Update yarn
run: |
node --version
yarn global add yarn@latest
node-version: ${{ matrix.node }}
cache: yarn

- name: Install dependencies
run: yarn install --ignore-engines --frozen-lockfile

- name: Build packages
run: yarn build

- name: Test
run: yarn test-ci

0 comments on commit f33be70

Please sign in to comment.