use workflow matrix
This commit is contained in:
33
.github/workflows/the.yml
vendored
33
.github/workflows/the.yml
vendored
@@ -13,36 +13,19 @@ env:
|
|||||||
TEST_GUILD_ID: ${{ secrets.TEST_GUILD_ID }}
|
TEST_GUILD_ID: ${{ secrets.TEST_GUILD_ID }}
|
||||||
|
|
||||||
jobs:
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
# https://github.com/actions/setup-node#supported-version-syntax
|
# https://github.com/actions/setup-node#supported-version-syntax
|
||||||
node-version: "lts/*"
|
node-version: ${{ matrix.node-version }}
|
||||||
- run: npm i -g pnpm
|
- run: npm i -g pnpm
|
||||||
- run: pnpm install --frozen-lockfile
|
- run: pnpm install --frozen-lockfile
|
||||||
- run: pnpm build
|
- run: pnpm run ${{ matrix.pnpm-script }}
|
||||||
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user