From 93cf3156e1f0cecba9aefb8e112002ad9d4b5c58 Mon Sep 17 00:00:00 2001 From: riicardojs Date: Wed, 16 Apr 2025 23:54:24 -0300 Subject: [PATCH] feat: add GitHub Actions workflow to run end-to-end tests on pull requests --- .github/workflows/run-e2e-tests.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/run-e2e-tests.yml diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml new file mode 100644 index 0000000..570cf56 --- /dev/null +++ b/.github/workflows/run-e2e-tests.yml @@ -0,0 +1,34 @@ +name: Run E2E Tests + +on: [pull_request] + +jobs: + run-unit-tests: + name: Run E2E Tests + runs-on: ubuntu-latest + + services: + postgres: + image: bitnami/postgresql + ports: + - 5432:5432 + env: + POSTGRESQL_USER: docker + POSTGRESQL_PASSWORD: docker + POSTGRESQL_DATABASE: apisolid + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: '20.x' + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm run test:e2e + env: + JWT_SECRET: testing + DATABASE_URL: "postgresql://docker:docker@localhost:5432/apisolid?schema=public"