E2E tests #37
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
name: E2E tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: '0 0 * * *' | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || | |
github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Run e2e tests | |
run: | | |
docker-compose -f tests/e2e/docker-compose.yml --profile $SYNPRESS_PROFILE up --build --exit-code-from synpress | |
env: | |
# conditionals based on github event | |
SYNPRESS_PROFILE: ${{ github.event_name == 'schedule' && 'daily-tests' || 'synpress' }} | |
CYPRESS_AGORIC_NET: ${{ github.event_name == 'schedule' && 'emerynet' || 'local' }} | |
# for docker-compose.yml | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
DOCKER_BUILDKIT: 1 | |
DOCKER_DEFAULT_PLATFORM: linux/amd64 | |
NGROK_AUTH: ${{ secrets.NGROK_AUTH }} | |
NGROK_BASIC_AUTH: ${{ secrets.NGROK_BASIC_AUTH }} | |
CYPRESS_PRIVATE_KEY_WITH_FUNDS: ${{ secrets.CYPRESS_PRIVATE_KEY_WITH_FUNDS }} | |
ANVIL_FORK_URL: ${{ secrets.ANVIL_FORK_URL }} | |
GH_PAT: ${{ secrets.GH_PAT }} | |
GH_USERNAME: ${{ secrets.GH_USERNAME }} | |
# cypress dashboard | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} | |
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }} | |
- name: Archive e2e artifacts | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: e2e-artifacts | |
path: | | |
tests/e2e/docker/videos | |
tests/e2e/docker/videos-ci | |
tests/e2e/docker/screenshots | |
continue-on-error: true |