From 69e6b826e213da0750ee56d0bf820452fa0321a1 Mon Sep 17 00:00:00 2001 From: Vasyl Ivanchuk Date: Thu, 14 Sep 2023 20:11:47 +0300 Subject: [PATCH] feat: api e2e tests workflow (#3) --- .github/workflows/api-e2e-tests.yml | 54 +++++++++++++++++++++++++++++ .github/workflows/validate-pr.yml | 1 + 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/api-e2e-tests.yml diff --git a/.github/workflows/api-e2e-tests.yml b/.github/workflows/api-e2e-tests.yml new file mode 100644 index 0000000000..7e3e58c62e --- /dev/null +++ b/.github/workflows/api-e2e-tests.yml @@ -0,0 +1,54 @@ +name: API E2E tests + +on: + pull_request: + types: + - opened + - edited + - reopened + - synchronize + +jobs: + runE2ETests: + name: Run E2E tests + timeout-minutes: 10 + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/api + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Start docker containers + run: | + docker-compose -f "docker-compose.e2e.yaml" up -d --build + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: | + npm ci --ignore-scripts + + - name: Run e2e tests + run: | + npm run test:e2e + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/composite@v2 + if: always() + with: + files: "packages/api/e2e-junit.xml" + check_run_annotations: all tests, skipped tests + report_individual_runs: "true" + check_name: API E2E Test Results + + - name: Stop containers + if: always() + run: docker-compose -f "docker-compose.e2e.yaml" down \ No newline at end of file diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index 6cc7ea4319..797523479d 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -61,6 +61,7 @@ jobs: packages/worker/junit.xml check_run_annotations: all tests, skipped tests report_individual_runs: "true" + check_name: Unit Test Results - name: Build run: |