Skip to content

Daily test

Daily test #472

Workflow file for this run

name: Daily test
on:
schedule:
# At 04:00 UTC on every day-of-week from Tuesday through Friday.
- cron: '0 04 * * 2-5'
# At 12:00 UTC on Monday.
- cron: '0 12 * * 1'
env:
E2E_USE_NPM_REGISTRY: true
# Platform environment to log into for the e2e tests.
PLATFORM_ENV: 'stg'
# Username used to log into the organization whose ID is stored in the ORG_ID variable
PLATFORM_USER_NAME: ${{ secrets.PLATFORM_USER_NAME }}
# Password used to log into the organization whose ID is stored in the ORG_ID variable
PLATFORM_USER_PASSWORD: ${{ secrets.PLATFORM_USER_PASSWORD }}
# API key to delete all the API keys created by the e2e tests
PLATFORM_API_KEY: ${{ secrets.PLATFORM_API_KEY }}
# ID of the organization to log into for the e2e tests
ORG_ID: ${{ secrets.ORG_ID }}
# Passphrase use to encode/decode cliConfig
E2E_TOKEN_PASSPHRASE: ${{ secrets.E2E_TOKEN_PASSPHRASE }}
jobs:
e2e-setup-login:
name: End-to-end login
runs-on: 'ubuntu-20.04'
timeout-minutes: 30
outputs:
cliConfigJson: ${{ steps.setup.outputs.cliConfigJson}}
env:
# ID of the test run to identify resources to teardown.
TEST_RUN_ID: 'id${{ matrix.os }}-${{ github.sha }}-${{ github.run_attempt }}-dailyg'
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
# pulls all commits (needed for computing the next version)
fetch-depth: 0
- name: Checkout last tag
run: git checkout $(git describe --abbrev=0 --tags)
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
cache: 'npm'
node-version-file: '.nvmrc'
- name: Install Coveo CLI
run: npm i -g @coveo/cli@latest
- uses: ./.github/actions/e2e-login
id: setup
e2e:
name: End-to-end tests
runs-on: ${{matrix.os}}
needs: [e2e-setup-login]
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'windows-latest']
node: [18]
spec:
[
'angular.specs.ts',
'atomic.specs.ts',
'auth.specs.ci.ts',
'orgList.specs.ts',
'orgResources.specs.ts',
'react.specs.ts',
'vue.specs.ts',
]
exclude:
- os: windows-latest
spec: auth.specs.ci.ts
env:
# ID of the test run to identify resources to teardown.
TEST_RUN_ID: 'id${{ matrix.os }}-${{ github.sha }}-${{ github.run_attempt }}-dailyg'
COVEO_DISABLE_AUTOUPDATE: true
CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
# pulls all commits (needed for computing the next version)
fetch-depth: 0
- name: Checkout last tag
run: git checkout $(git describe --abbrev=0 --tags)
- name: Install Coveo CLI
run: npm i -g @coveo/cli@latest
- uses: ./.github/actions/e2e-run
with:
os: ${{ matrix.os }}
node: ${{ matrix.node }}
spec: ${{ matrix.spec }}
cliConfigJson: ${{ env.CLI_CONFIG_JSON }}
e2e-teardown:
name: End-to-end teardown
if: ${{ always() }}
needs: [e2e, e2e-setup-login]
runs-on: ubuntu-20.04
env:
# ID of the test run to identify resources to teardown.
TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}-dailyg'
CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
# pulls all commits (needed for computing the next version)
fetch-depth: 0
# pulls all tags (needed for computing the next version)
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Checkout last tag
run: git checkout $(git describe --abbrev=0 --tags)
- uses: ./.github/actions/e2e-clean
with:
cliConfigJson: ${{ env.CLI_CONFIG_JSON }}
e2e-report:
name: End-to-end status reporter
timeout-minutes: 30
if: ${{ always() }}
needs: e2e
runs-on: ubuntu-20.04
environment: Daily Tests
steps:
- name: Check e2e matrix status
if: ${{ needs.e2e.result != 'success' }}
run: curl --request POST --url ${{ secrets.SLACK_WEBHOOK }}