Skip to content

add new assignment DIT62 #8

add new assignment DIT62

add new assignment DIT62 #8

Workflow file for this run

# https://docs.cypress.io/guides/continuous-integration/github-actions
name: Cypress Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# Create and save build
install:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build project
uses: cypress-io/github-action@v5
with:
# Disable running of tests within install job
runTests: false
build: yarn run build
- name: Save build folder
uses: actions/upload-artifact@v3
with:
name: build
if-no-files-found: error
path: .next
e2e:
runs-on: ubuntu-22.04
needs: install
strategy:
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download the build folder
uses: actions/download-artifact@v3
with:
name: build
path: .next
- name: Cypress run e2e tests
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v5
with:
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
start: yarn start
wait-on: "http://localhost:3000" # Waits for above
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
record: true
# parallel: true # Runs test in parallel using settings above
browser: chrome
env:
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo → Settings → Secrets → Actions
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# re-enable PR comment bot
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}
component:
runs-on: ubuntu-latest
needs: install
strategy:
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download the build folder
uses: actions/download-artifact@v3
with:
name: build
path: .next
- name: Cypress run component tests
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v5
with:
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
start: yarn start
wait-on: "http://localhost:3000" # Waits for above
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
record: true
#parallel: true # Runs test in parallel using settings above
browser: chrome
component: true
# working-directory: examples/component-tests
# spec: components/**/*cy.tsx
env:
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo → Settings → Secrets → Actions
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# re-enable PR comment bot
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}