Skip to content

Commit

Permalink
add ci github action file (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
acharyakavita authored Aug 12, 2024
1 parent ba02f38 commit 2e6e045
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Continuous Integration

on:
pull_request:
push:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Use Yarn cache
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile

- name: Test
run: yarn run test

- name: Lint
run: yarn run lint

- name: Build
run: yarn run build

0 comments on commit 2e6e045

Please sign in to comment.