Skip to content

Commit

Permalink
add ci github action file
Browse files Browse the repository at this point in the history
  • Loading branch information
acharyakavita committed Aug 9, 2024
1 parent ba02f38 commit 8f55ba3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"to-ast": "^1.0.0"
},
"engines": {
"node": ">=12.0"
"node": ">=18.0"
},
"license": "MIT",
"dependencies": {
Expand All @@ -79,4 +79,4 @@
],
"testEnvironment": "node"
}
}
}

0 comments on commit 8f55ba3

Please sign in to comment.