From f33be709872bfd6883a45c66bde60c97250ec8db Mon Sep 17 00:00:00 2001 From: Jesse Oberstein <7157500+joberstein@users.noreply.github.com> Date: Wed, 8 Nov 2023 23:35:11 -0500 Subject: [PATCH] ci: switch ci to test matrix (#3748) --- .github/workflows/CI.yml | 76 +++++++--------------------------------- 1 file changed, 12 insertions(+), 64 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 03f18d0a0b..f8e55f62ae 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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