Skip to content

Commit

Permalink
A big update to the run layout
Browse files Browse the repository at this point in the history
  • Loading branch information
20041540MichaelKelly authored Jan 22, 2024
1 parent a733cc9 commit 1178ef0
Showing 1 changed file with 37 additions and 11 deletions.
48 changes: 37 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,56 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check out my e2e tests
uses: actions/checkout@v3
with:
repository: tutors-sdk/tutors-apps
path: ./cypress-tests
ref: test/add-cypress-tests
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"

- name: Install dependencies
run: npm install
working-directory: ./
working-directory: ./path/to/your/app

- name: Create app env
run: cp .env.example .env
working-directory: ./
working-directory: ./path/to/your/app

- name: Build app
run: npm run build
working-directory: ./
- name: Run preview & cypress tests
run: npm run preview & npx cypress run --config-file cypress-tests/cypress.config.ts
working-directory: ./path/to/your/app

cypress-tests:
name: Run Cypress Tests
runs-on: ubuntu-latest
needs: app # Ensure the 'app' job has completed before running Cypress tests

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"

- name: Install Cypress
run: npm install -g cypress

- name: Check out Cypress tests
uses: actions/checkout@v3
with:
repository: tutors-sdk/tutors-apps
path: ./dynamic-app-tests
ref: test/add-cypress-tests

- name: Run Cypress tests
run: npx cypress run --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --config-file ./dynamic-app-tests/cypress/tsconfig.json
working-directory: ./

0 comments on commit 1178ef0

Please sign in to comment.