Skip to content

Commit

Permalink
chore: use nx to execute cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Jun 24, 2024
1 parent 9476daa commit fefa9f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:
- name: Run Cypress tests
run:
npm run cy:run -- --spec "**/kit/${{ matrix.project }}/**/*.cy.ts" --config baseUrl="${{ env.UNIVERSAL_SERVER
}}"
npx nx e2e demo-integrations --spec="**/kit/${{ matrix.project }}/**/*.cy.ts" --baseUrl=${{
env.UNIVERSAL_SERVER}}

e2e-recipes:
if: ${{ !contains(github.head_ref, 'release/') }}
Expand All @@ -85,7 +85,7 @@ jobs:
curl -X GET -I -f "${{ env.UNIVERSAL_SERVER }}"
- name: Run Cypress tests
run: npm run cy:run -- --spec "**/recipes/**/*.cy.ts" --config baseUrl="${{ env.UNIVERSAL_SERVER }}"
run: npx nx e2e demo-integrations --spec="**/recipes/**/*.cy.ts" --baseUrl=${{ env.UNIVERSAL_SERVER}}

e2e-others:
if: ${{ !contains(github.head_ref, 'release/') }}
Expand All @@ -112,8 +112,8 @@ jobs:
# Replace with npm run cy:run -- --spec "**/!(kit|recipes)/*.cy.ts" --config baseUrl="${{ env.UNIVERSAL_SERVER }}"
# After this issue fix: https://github.com/cypress-io/cypress/issues/22407
run:
npm run cy:run -- --spec "**/(angular|react|ssr|addons|others)/**/*.cy.ts" --config baseUrl="${{
env.UNIVERSAL_SERVER }}"
npx nx e2e demo-integrations --spec="**/(angular|react|ssr|addons|others)/**/*.cy.ts" --baseUrl=${{
env.UNIVERSAL_SERVER}}

component-testing:
if: ${{ !contains(github.head_ref, 'release/') }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"build:prerender": "nx run demo:prerender",
"*** Cypress ***": "",
"cy:open": "cypress open --project ./projects/demo-integrations/",
"cy:run": "cypress run --project ./projects/demo-integrations/ --browser chrome",
"cy:run": "nx e2e demo-integrations",
"*** Release ***": "",
"release": "standard-version -a --no-verify",
"release:patch": "npm run release -- --release-as patch",
Expand Down
2 changes: 2 additions & 0 deletions projects/demo-integrations/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"options": {
"cypressConfig": "{projectRoot}/cypress.config.ts",
"testingType": "e2e",
"skipServe": true,
"browser": "chrome",
"devServerTarget": "demo:serve:development"
}
},
Expand Down

0 comments on commit fefa9f7

Please sign in to comment.