From 2a464678f3520561ef7cec366e4bc06896a3d6c5 Mon Sep 17 00:00:00 2001 From: Nicolas Legros Date: Fri, 19 Jul 2024 16:18:01 -0400 Subject: [PATCH] feat: Migrated functional tests from Jenkins to GHA [UA-8891] --- .github/workflows/fts.yml | 61 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/fts.yml diff --git a/.github/workflows/fts.yml b/.github/workflows/fts.yml new file mode 100644 index 0000000..bfc39d9 --- /dev/null +++ b/.github/workflows/fts.yml @@ -0,0 +1,61 @@ +name: Functional Tests +on: + workflow_dispatch: + inputs: + environment: + description: The environment in which to run the job + type: choice + options: + - dev + - prd + default: dev + version: + description: The version to test + type: string + default: 2 + api-key: + description: The API key used to push analytics + type: string + default: coveo-analytics-send-to-dev-commercestore-api-key + endpoint: + description: The endpoint on which to send the analytics + type: string + default: https://analyticsdev.cloud.coveo.com/rest/ua + only-send-slack-on-failure: + description: Whether to only send a slack message on failure + type: boolean + default: true + +jobs: + test-job: + runs-on: ubuntu-latest + steps: + - name: Checkout Analytics.js + uses: actions/checkout@v4 + with: + repository: coveo/coveo.analytics.js + token: ${{ secrets.COMMIT_TOKEN }} + + - name: Checkout Infra Analytics.js + uses: actions/checkout@v4 + with: + path: infra + ref: main + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + + - name: Run Cypress + uses: cypress-io/github-action@v5 + + - name: Upload Artifact + if: failure() + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 + with: + name: cypress-screenshots + path: cypress/screenshots + + - uses: actions/checkout@v4