From 4d2d924c7ce086ad67a83fb05034c8b1a7c43904 Mon Sep 17 00:00:00 2001 From: Darian Benam Date: Sun, 13 Aug 2023 21:33:30 -0400 Subject: [PATCH] Added GitHub Actions workflow to lint and compile code - `main.yml` --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..cb55db4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Lint and Compile Code + +on: + push: + branches: + - '*' + tags-ignore: + - 'release-*' + pull_request: + branches: + - '*' + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Cache npm Dependencies + uses: actions/cache@v3 + with: + path: ./ + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-node- + + - name: Install npm Dependencies + run: npm install + + - name: Lint Code + run: npm run lint + + - name: Compile Code + run: npm run compile