Skip to content

Commit

Permalink
matrix ci.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Stamm <[email protected]>
  • Loading branch information
timostamm committed Sep 2, 2024
1 parent 6a3b001 commit 58ed288
Showing 1 changed file with 23 additions and 83 deletions.
106 changes: 23 additions & 83 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,73 +16,27 @@ env:
DO_NOT_TRACK: 1

jobs:
format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: "npm"
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}/format/${{ github.sha }}
restore-keys: ${{ runner.os }}/format
- run: npm ci
- run: npx turbo run format
- name: Check changed files
run: node scripts/gh-diffcheck.js
license-header:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: "npm"
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}/license-header/${{ github.sha }}
restore-keys: ${{ runner.os }}/license-header
- run: npm ci
- run: npx turbo run license-header
- name: Check changed files
run: node scripts/gh-diffcheck.js
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: "npm"
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}/lint/${{ github.sha }}
restore-keys: ${{ runner.os }}/lint
- run: npm ci
- run: npx turbo run lint
attw:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: "npm"
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}/attw/${{ github.sha }}
restore-keys: ${{ runner.os }}/attw
- run: npm ci
- run: npx turbo run attw
bundle-size:
tasks:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
task:
- format
- license-header
- lint
- attw
- bundle-size
- build
include:
- task: format
diff-check: true
- task: license-header
diff-check: true
- task: bundle-size
diff-check: true
steps:
- name: ${{ matrix.task }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand All @@ -91,27 +45,13 @@ jobs:
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}/bundle-size/${{ github.sha }}
restore-keys: ${{ runner.os }}/bundle-size
key: ${{ runner.os }}/${{ matrix.task }}/${{ github.sha }}
restore-keys: ${{ runner.os }}/${{ matrix.task }}
- run: npm ci
- run: npx turbo run bundle-size
- run: npx turbo run ${{ matrix.task }}
- name: Check changed files
if: ${{ matrix.diff-check }}
run: node scripts/gh-diffcheck.js
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: "npm"
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}/build/${{ github.sha }}
restore-keys: ${{ runner.os }}/build
- run: npm ci
- run: npx turbo run build
test:
runs-on: ubuntu-22.04
strategy:
Expand Down

0 comments on commit 58ed288

Please sign in to comment.