From 3741cbb1ba230d4fc3fc167aa46a4167b6df0280 Mon Sep 17 00:00:00 2001 From: cahnory Date: Sun, 15 Oct 2023 19:14:55 +0200 Subject: [PATCH] chore: setup github CI workflow --- .github/workflows/ci.yaml | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..42e3481 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,47 @@ +name: Continuous Integration + +on: + push: + branches: + - main + pull_request: + branches: + - main + types: + - opened + - synchronize + +jobs: + ci: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: + - 18.x + - 20.x + + steps: + - name: Checkout to ${{ github.ref }} + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: ^8.6.2 + - name: Install node ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + - name: Install dependencies + run: pnpm install --ignore-scripts + - name: Build + run: pnpm build + - name: Lint + run: pnpm test:lint + - name: Type check + run: pnpm test:types + - name: Unit test + run: pnpm test:unit + - name: Commit lint + run: pnpm test:commit