From cac3ff26f8bf4d2f24a4da0c354bf5e3acbcd144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20de=20Vasconcelos?= Date: Thu, 26 Dec 2024 11:56:10 +0000 Subject: [PATCH] Add CI workflow for automated build and test on alpha branch --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ turbo.json | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..048303d3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: ["alpha"] + pull_request: + types: [opened, synchronize] + +jobs: + build: + name: Build and Test + timeout-minutes: 15 + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Test + run: npm run test \ No newline at end of file diff --git a/turbo.json b/turbo.json index 5e85587a..426a387f 100644 --- a/turbo.json +++ b/turbo.json @@ -5,7 +5,7 @@ "tasks": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**"] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "dev": { "cache": false,