-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Migrated functional tests from Jenkins to GHA [UA-8891]
- Loading branch information
1 parent
b2f1d58
commit 2a46467
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |