Skip to content

Commit

Permalink
separate e2e in ci.yml into ci-e2e.yml with 6 parallel container (#…
Browse files Browse the repository at this point in the history
…589)

* added 5 parallel container for cypress

* Added if forked condition as cypress cannot run on forked PR

* separate out e2e into its own workflow file
  • Loading branch information
fuxingloh authored Aug 14, 2021
1 parent 9751870 commit bf00cc9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 36 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ updates:
directory: '/'
schedule:
interval: 'weekly'
day: 'thursday'
labels:
- "kind/dependencies"
ignore:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/ci-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI - E2E

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
main:
name: Cypress
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
strategy:
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
matrix:
containers: [ 1, 2, 3, 4, 5, 6 ]
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/setup-node@25316bbc1f10ac9d8798711f44914b1cf3c4e954
with:
node-version: 15
cache: 'npm'

- run: npm ci

- name: Setup Playground
run: docker-compose -f docker-compose.yml up -d

- run: .github/workflows/ci/wait-for http://localhost:3001/_actuator/probes/liveness -t 120
- run: .github/workflows/ci/wait-for http://localhost:3002/_actuator/probes/liveness -t 120
- run: .github/workflows/ci/wait-for http://localhost:19551/ping -t 120

- uses: cypress-io/github-action@6122aa43014e18ec9c2d06fc0bdc5b6759064508
with:
install: false
record: true
parallel: true
start: npm run start:web
wait-on: 'http://localhost:19006'
browser: chrome
spec: cypress/integration/**
env:
CYPRESS_E2E: true
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47
36 changes: 0 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,3 @@ jobs:
- uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47
with:
fail_ci_if_error: true

e2e:
name: End-to-end
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/setup-node@25316bbc1f10ac9d8798711f44914b1cf3c4e954
with:
node-version: 15
cache: 'npm'

- run: npm ci

- name: Setup Playground
run: docker-compose -f docker-compose.yml up -d

- run: .github/workflows/ci/wait-for http://localhost:3001/_actuator/probes/liveness -t 120
- run: .github/workflows/ci/wait-for http://localhost:3002/_actuator/probes/liveness -t 120
- run: .github/workflows/ci/wait-for http://localhost:19551/ping -t 120

- uses: cypress-io/github-action@6122aa43014e18ec9c2d06fc0bdc5b6759064508
with:
install: false
record: true
start: npm run start:web
wait-on: 'http://localhost:19006'
browser: chrome
spec: cypress/integration/**
env:
CYPRESS_E2E: true
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47
with:
fail_ci_if_error: true

0 comments on commit bf00cc9

Please sign in to comment.