Skip to content

Commit

Permalink
chore(ci): improve build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Aug 23, 2023
1 parent 52af60f commit 50adda5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/format-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
author: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
body: I ran `pnpm format` 🧑‍💻
branch: actions/format
commit-message: "chore(format): 🤖 ✨"
commit-message: 'chore(format): 🤖 ✨'
labels: 🤖 bot
title: "chore(format): 🤖 ✨"
title: 'chore(format): 🤖 ✨'
token: ${{ steps.generate-token.outputs.token }}
28 changes: 22 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,38 @@ on:
- beta
- main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

permissions:
contents: read # for checkout

jobs:
build:
runs-on: ubuntu-latest
name: Lint & Build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: corepack enable && pnpm --version
- run: pnpm install
- run: pnpm type-check
- run: pnpm lint
- run: pnpm build

test:
runs-on: ${{ matrix.platform }}
name: Node.js ${{ matrix.node-version }} / ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
node-version: [lts/*, current]
platform: [macos-latest, ubuntu-latest, windows-latest]
node-version: [lts/*]
include:
- platform: macos-latest
node-version: lts/*
- platform: ubuntu-latest
node-version: current
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -31,7 +48,6 @@ jobs:
- run: corepack enable && pnpm --version
- run: pnpm install
- run: pnpm test
- run: pnpm lint

release:
permissions:
Expand All @@ -40,7 +56,7 @@ jobs:
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
name: 'Semantic release'
needs: test
needs: [build, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 50adda5

Please sign in to comment.