0
0
Cypresstesting~10 mins

GitHub Actions integration in Cypress - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the event that triggers the GitHub Actions workflow on push.

Cypress
on: [1]
Drag options to blanks, or click blank then click option'
Apull_request
Bschedule
Crelease
Dpush
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pull_request' instead of 'push' when you want to trigger on code push.
Using 'schedule' which runs on a timer, not on code changes.
2fill in blank
medium

Complete the code to specify the operating system for the job runner.

Cypress
runs-on: [1]
Drag options to blanks, or click blank then click option'
Aubuntu-latest
Bwindows-latest
Cmacos-latest
Ddebian-latest
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing Windows or macOS when the project expects Linux environment.
Using an unsupported or incorrect OS name.
3fill in blank
hard

Fix the error in the step name to correctly run Cypress tests.

Cypress
- name: [1]
  run: npx cypress run
Drag options to blanks, or click blank then click option'
ARunCypressTests
BRun Cypress Tests
Crun-cypress-tests
Drun cypress tests
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase or camelCase which is less readable in logs.
Using names without spaces that are hard to read.
4fill in blank
hard

Fill both blanks to set up Node.js and install dependencies before running tests.

Cypress
- uses: actions/setup-node@v3
  with:
    node-version: [1]
- run: [2]
Drag options to blanks, or click blank then click option'
A16
Bnpm install
C18
Dyarn install
Attempts:
3 left
💡 Hint
Common Mistakes
Using a Node.js version not supported by the project.
Running yarn install when the project uses npm.
5fill in blank
hard

Fill all three blanks to create a job that runs on Ubuntu, installs dependencies, and runs Cypress tests.

Cypress
jobs:
  test:
    runs-on: [1]
    steps:
      - uses: actions/checkout@v3
      - name: Install dependencies
        run: [2]
      - name: Run Cypress Tests
        run: [3]
Drag options to blanks, or click blank then click option'
Aubuntu-latest
Bnpm install
Cnpx cypress run
Dwindows-latest
Attempts:
3 left
💡 Hint
Common Mistakes
Using Windows runner when the project expects Linux.
Skipping dependency installation before tests.
Running Cypress tests with wrong commands.