Reputation: 13
I am using NX 14.5.1 and cypress 10.2.0. When I run e2e tests on GitHub actions, my tests always run twice. Sometimes one of them causes an error.
This is my github workflow:
jobs:
continuous_integration:
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
# run copies of the current job in parallel
containers: [1, 2, 3, 4, 5]
steps:
- name: š Checkout Repo
uses: actions/checkout@v3
- name: š Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install Firebase Emulator Suite
run: npm install -g [email protected]
- name: š¾ Install Dependencies
run: npm ci
- name: ā
E2E Tests
uses: cypress-io/github-action@v4
with:
install: false
start: |
npm run e2e:firebase
npm run e2e
wait-on: http://localhost:4200
wait-on-timeout: 120
working-directory: apps/e2e
record: true
parallel: true
env:
FIREBASE_TOKEN: '${{ secrets.NX_FIREBASE_TOKEN }}'
And the result is like this result e2e test on GitHub Action
ā should go to My Cards page (5043ms)
ā should open Paint Point modal (3831ms)
ā should open Insight modal (3323ms)
ā should open Idea modal (2591ms)
(Attempt 1 of 3) should go to My Cards page
ā should go to My Cards page (2328ms)
ā should open Paint Point modal (1978ms)
ā should open Insight modal (2302ms)
ā should open Idea modal (2245ms)
ā should create Paint Point card (4321ms)
(Attempt 1 of 3) should create Paint Point card
ā should create Insight card (7147ms)
ā should create Idea card (8727ms)
ā should create Paint Point card (13580ms)
ā should show modal from header create button (7298ms)
Do I miss a GitHub workflow configuration here?
Upvotes: 0
Views: 1188
Reputation: 1
I think that's because you will need to split the workflow into 2 jobs as describe here.
Also you would need to make sure you are using their container image as mentioned Here
Upvotes: 1