diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..74aa73c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + +jobs: + build: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: back + + strategy: + matrix: + node-version: [20.x] + + steps: + - name: Checkout código + uses: actions/checkout@v4 + + - name: Configurar Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + cache-dependency-path: back/package-lock.json + + - name: Instalar dependências + run: npm ci + + - name: Verificar tipos (TypeScript) + run: npx tsc --noEmit + + - name: Build + run: npm run build --if-present + + # para testes futuros + # - name: Rodar testes + # run: npm test \ No newline at end of file