From 420490e12a21a2b2747dd42503a870f49c25bca7 Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Wed, 30 Aug 2023 12:33:22 +0200 Subject: [PATCH] Add GitHub Actions to lint --- .github/.workflows/check.yml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/.workflows/check.yml diff --git a/.github/.workflows/check.yml b/.github/.workflows/check.yml new file mode 100644 index 0000000..ae3fa61 --- /dev/null +++ b/.github/.workflows/check.yml @@ -0,0 +1,44 @@ +name: Check and build + +on: + push: + branches: + - "main" + pull_request: + branches: + - "main" + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Use latest Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + cache: "pnpm" + - run: pnpm install + - run: pnpm check + + build: + needs: check + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: + - 16 + - 18 + - 20 + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + - run: pnpm install + - run: pnpm build