From ba96209eef11c1a83ff66deaa0e20c033ce941ce Mon Sep 17 00:00:00 2001 From: Rengga Prakoso Nugroho Date: Tue, 31 Dec 2024 00:55:57 +0700 Subject: [PATCH] ci: add simple type check and build capabilities on Gh Actions --- .github/workflows/build-capabilities.yml | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build-capabilities.yml diff --git a/.github/workflows/build-capabilities.yml b/.github/workflows/build-capabilities.yml new file mode 100644 index 0000000..926e774 --- /dev/null +++ b/.github/workflows/build-capabilities.yml @@ -0,0 +1,46 @@ +name: Build Capability & Type Check + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] + + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + - name: Install dependencies + run: pnpm install + - name: Build with Next.js + run: pnpm next build + + type-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Install dependencies + run: pnpm install + - name: Type Check + run: pnpm tsc --noEmit