Skip to content

Commit

Permalink
chore(ci): update workflow file
Browse files Browse the repository at this point in the history
Signed-off-by: Chawye Hsu <[email protected]>
  • Loading branch information
chawyehsu committed Oct 15, 2024
1 parent aba49ec commit ce6c431
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ on:

jobs:
test:
name: Test on ${{ matrix.os }} (Node ${{ matrix.node-version }})
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [16.x, 18.x]

steps:
- name: Checkout Code
Expand All @@ -26,25 +25,11 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 18
cache: 'yarn'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Cache Yarn
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn

- name: Test
- name: Invoke Test
run: yarn test
env:
CI: true

0 comments on commit ce6c431

Please sign in to comment.