Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature:Developer] Integrate Cypress Cloud #9517

Merged
merged 24 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
79 changes: 71 additions & 8 deletions .github/workflows/submitty_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,6 @@ jobs:
env:
BASE_URL: http://localhost

- name: Run cypress e2e tests with pam auth
uses: cypress-io/github-action@v5
with:
config: baseUrl=http://localhost
working-directory: ${{env.SUBMITTY_REPOSITORY}}/site
browser: chrome
env: run_area=CI

- name: Stop autograding services
run: |
sudo systemctl stop submitty_autograding_worker
Expand Down Expand Up @@ -449,6 +441,77 @@ jobs:
working-directory: ${{ env.SUBMITTY_REPOSITORY }}
run: sudo bash tests/test_site_error_log.sh

e2eCypress_cloud:
runs-on: ubuntu-20.04
strategy:
# don't fail the entire matrix on failure
fail-fast: false
matrix:
# run copies of the current job in parallel
containers: [1, 2, 3, 4]
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: submitty_dbuser
POSTGRES_USER: postgres
TZ: America/New_York
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: ./.github/actions/e2e-Setup-Composite
# TODO: Remove this block after upgrading jsPDF
- name: Cache Node Modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-cache-node-modules-dev-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-cache-node-modules-dev

- name: Install node dependencies
working-directory: ${{env.SUBMITTY_REPOSITORY}}/site
run: |
npm install file-saver --save
npm install --production=false

- name: Run cypress e2e tests with pam auth
uses: cypress-io/github-action@v5
with:
config: baseUrl=http://localhost
working-directory: ${{env.SUBMITTY_REPOSITORY}}/site
browser: chrome
env: run_area=CI
record: true
parallel: true # Runs test in parallel using settings above
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}}

- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: ${{env.SUBMITTY_REPOSITORY}}/site/cypress/screenshots
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
path: ${{env.SUBMITTY_REPOSITORY}}/site/cypress/videos

- name: Check for site errors
working-directory: ${{ env.SUBMITTY_REPOSITORY }}
run: sudo bash tests/test_site_error_log.sh


e2eIntegrationTests:
runs-on: ubuntu-20.04
Expand Down
1 change: 1 addition & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ rules:
ignore: |
site/node_modules/*
site/vendor/*
.github/workflows/cypress_ci_testing.yml
williamjallen marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions site/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ export default defineConfig({
},
baseUrl: 'http://localhost:1511',
specPattern: 'cypress/e2e/**/*.spec.js',
projectId: 'es51qa'
},
})