fix: Update main.yml #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cypress Tests using Cypress Docker Image | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
container: cypress/browsers:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: install pip | |
run: | | |
apt update -qq | |
apt install -y python3-pip | |
pip3 --version | |
- name: Checkout xblock-sdk repo | |
uses: actions/checkout@v2 | |
with: | |
repository: openedx/xblock-sdk | |
path: xblock-sdk | |
- name: Setup xblock-sdk | |
working-directory: xblock-sdk | |
run: | | |
pwd | |
pip install -qr requirements/dev.txt | |
pip install -qr requirements/local.txt | |
- name: Setup dependencies | |
run: | | |
pip install xblock-utils==4.0.0 | |
- name: setup h5p xblock | |
run: | | |
pip install . | |
- name: Run xblock workbench | |
working-directory: xblock-sdk | |
env: | |
EXCLUDE_SAMPLE_XBLOCKS: yes | |
run: | | |
python3 manage.py migrate --noinput | |
python3 ./manage.py runserver & | |
- name: Sleep for 5s to wait for django server getting up and running | |
uses: juliangruber/sleep-action@v1 | |
with: | |
time: 5s | |
- name: Cypress run | |
uses: cypress-io/github-action@v4 | |
with: | |
start: python3 ../../xblock-sdk/manage.py runserver | |
browser: chrome | |
working-directory: tests/cypress |