Skip to content

Commit a821e76

Browse files
authored
ci: add os matrix (#546)
1 parent 1d854b6 commit a821e76

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/dev.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ on:
88
- main
99
jobs:
1010
ci:
11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
node: "14.x"
1216
steps:
1317
- name: Setup
1418
uses: actions/[email protected]
1519
with:
1620
registry-url: "https://registry.npmjs.org"
17-
node-version: "14.x"
21+
node-version: ${{ matrix.node }}
1822
- name: Checkout
1923
uses: actions/[email protected]
2024
- name: Get Yarn Cache Directory Path
@@ -40,12 +44,13 @@ jobs:
4044
- name: Build
4145
run: yarn build
4246
- name: Sonar
47+
if: matrix.os == 'ubuntu-latest'
4348
uses: sonarsource/[email protected]
4449
env:
4550
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4651
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4752
- name: Release
48-
if: github.ref == 'refs/heads/main'
53+
if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest'
4954
run: yarn release
5055
env:
5156
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)