Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
refactor: simplify the ci build pipeline and avoid caching node modules
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Dec 22, 2023
1 parent f854db2 commit b36b991
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
types: [opened, synchronize]

jobs:
build:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16']
name: Build with Node ${{ matrix.node }}
name: Lint with Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -21,17 +21,9 @@ jobs:
with:
node-version: ${{ matrix.node }}
- run: yarn install --frozen-lockfile --check-files
- run: yarn lerna run prepare --stream
- run: yarn lint --max-warnings=0
- uses: actions/cache@v2
with:
key: v2-${{ github.sha }}-${{ matrix.node }}
path: |
'*'
!node_modules
test:
build:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
Expand All @@ -46,18 +38,19 @@ jobs:
# webpack-config,
xdl,
]
name: Test ${{ matrix.package }} on Node ${{ matrix.node }}
name: Build & Test ${{ matrix.package }} on Node ${{ matrix.node }}
steps:
- uses: actions/cache@v2
- uses: actions/checkout@v3
with:
path: '*'
key: v2-${{ github.sha }}-${{ matrix.node }}
fetch-depth: 1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install packages
run: yarn install --frozen-lockfile --check-files
- name: Build packages
run: yarn lerna run prepare --stream
- name: Test ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: yarn test
Expand Down

0 comments on commit b36b991

Please sign in to comment.