From 846ac5b61fc137e2fe6d8bb2b344da9a0af22492 Mon Sep 17 00:00:00 2001 From: MapleLeaf <19603573+itsMapleLeaf@users.noreply.github.com> Date: Wed, 8 Dec 2021 14:25:24 -0600 Subject: [PATCH] use workflow matrix --- .github/workflows/the.yml | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/the.yml b/.github/workflows/the.yml index fef77ec..e9c6cbf 100644 --- a/.github/workflows/the.yml +++ b/.github/workflows/the.yml @@ -13,36 +13,19 @@ env: TEST_GUILD_ID: ${{ secrets.TEST_GUILD_ID }} jobs: - build: + ci: + strategy: + matrix: + node-version: [14, 16, 17] + pnpm-script: [build, lint, test, typecheck] + name: ${{ matrix.pnpm-script }} on node ${{ matrix.node-version }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: # https://github.com/actions/setup-node#supported-version-syntax - node-version: "lts/*" + node-version: ${{ matrix.node-version }} - run: npm i -g pnpm - run: pnpm install --frozen-lockfile - - run: pnpm build - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - # https://github.com/actions/setup-node#supported-version-syntax - node-version: "lts/*" - - run: npm i -g pnpm - - run: pnpm install --frozen-lockfile - - run: pnpm lint - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - # https://github.com/actions/setup-node#supported-version-syntax - node-version: "lts/*" - - run: npm i -g pnpm - - run: pnpm install --frozen-lockfile - - run: pnpm test + - run: pnpm run ${{ matrix.pnpm-script }}