From 344f17e7c4299bb7ae6e52b2e77d61ae4569af1a Mon Sep 17 00:00:00 2001 From: Josh Harris <49429928+jharris711@users.noreply.github.com> Date: Sat, 23 Mar 2024 02:32:47 -0400 Subject: [PATCH] Add github action --- .github/workflows/CI.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) 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..e2cf0f5 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,41 @@ +name: ci + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + ci: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [18] + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Setup node env + uses: actions/setup-node@v2.1.2 + with: + node-version: ${{ matrix.node }} + + - name: Cache node_modules + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Install dependencies + run: npm ci + + - name: Run code style check + run: npm run style:all