Skip to content

fix: Update main.yml #131

fix: Update main.yml

fix: Update main.yml #131

Workflow file for this run

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: Checkout xblock-sdk repo
uses: actions/checkout@v2
with:
repository: openedx/xblock-sdk
path: xblock-sdk
- uses: actions/setup-python@v5
id: setup_python
with:
python-version: '3.12'
- name: Setup python virtual env
run: |
python -m venv .venv
# - name: activate venv
# run: .venv/bin/activate
- name: install dependencies of xblock-sdk
working-directory: xblock-sdk
run: |
.venv/bin/python -m pip install xblock-utils==4.0.0
.venv/bin/python -m pip install -qr requirements/dev.txt
.venv/bin/python -m pip install -qr requirements/local.txt
- name: setup h5p xblock
run: |
.venv/bin/python -m pip install .
- name: Run xblock workbench
working-directory: xblock-sdk
env:
EXCLUDE_SAMPLE_XBLOCKS: yes
run: |
.venv/bin/python manage.py migrate --noinput
.venv/bin/python ./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