From 8f55ba3d8198a87b87036fef69da093d70f76e48 Mon Sep 17 00:00:00 2001 From: Kavitha Date: Fri, 9 Aug 2024 14:33:54 -0400 Subject: [PATCH] add ci github action file --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ package.json | 4 ++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..59fb31d --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 \ No newline at end of file diff --git a/package.json b/package.json index ee8eb8c..06dac2f 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "to-ast": "^1.0.0" }, "engines": { - "node": ">=12.0" + "node": ">=18.0" }, "license": "MIT", "dependencies": { @@ -79,4 +79,4 @@ ], "testEnvironment": "node" } -} +} \ No newline at end of file