diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3c2d486 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20] + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: npm + + - run: npm ci + + - name: Run tests + run: npm test + env: + NODE_ENV: test + JWT_SECRET: ci-test-jwt-secret-not-real + SESSION_SECRET: ci-test-session-secret-not-real + ADMIN_USERNAME: ci-test-admin + ADMIN_PASSWORD: ci-test-password + ALLOWED_ORIGINS: http://localhost:3000