From 28656846f85a79a9a6a1c04c7f62b496b657b4d6 Mon Sep 17 00:00:00 2001 From: Veirt Date: Fri, 8 Nov 2024 18:15:47 +0800 Subject: [PATCH] ci: set up CI pipeline for linting and building --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 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..75d912e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: Lint and Build + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x, 22.x, 23.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: true + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + + - name: Run Linting + run: pnpm run lint + + - name: Build Project + run: pnpm run build + +