From d416304592cd790f98ff34177304aa6f9e14e862 Mon Sep 17 00:00:00 2001 From: franferrazdev Date: Fri, 16 Oct 2026 16:08:37 -0300 Subject: [PATCH] feat: configure continuous integration pipeline via github actions workflow --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 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..0a21f94 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: Continuous Integration (CI) + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Get pnpm store diretory + id: pnpm-store + shell: bash + run: | + echo "store-path=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Setup pnpm cache + uses: actions/cache@v4 + with: + path: ${{steps.pnpm-store.outputs.store_path}} + key: ${{runner.os}}-pnpm-store-${{hashFiles('**/pnpm-lock.yaml')}} + restore-keys: | + ${{runner.os}}-pnpm-store- + + - name: Install Dependencies + run: pnpm test + + - name: Run Unit Tests (Jest) + run: npx playwright install --with-deps + + - name: Run End-to-End Tests (Playwright) + run: npx playwright test