-
Notifications
You must be signed in to change notification settings - Fork 66
56 lines (53 loc) · 1.58 KB
/
js_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Cypress E2E tests for Sphinx Needs
on: [pull_request]
jobs:
js_tests:
runs-on: ubuntu-latest
env:
ON_CI: true
FAST_BUILD: true
steps:
- name: Set Up Python 3.10.8
uses: actions/setup-python@v4
with:
python-version: 3.10.8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3.3.0
- name: Update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
pip install -r docs/requirements.txt
- name: Install Sphinx-Needs from master
run: |
pip install -e .
- name: Install Node dependencies
run: npm install cypress
- name: Build Docs
id: sphinx-build-docs
run: sphinx-build -a -T -E -j 4 -b html -d /tmp/sphinx_build/doctrees ./docs /tmp/sphinx_build/html
- name: E2E Cypress Test on Chrome
uses: cypress-io/github-action@v5
with:
browser: chrome
config-file: tests/js_test/cypress.config.js
start: npm start
# quote the url to be safe against YML parsing surprises
wait-on: 'http://localhost:8080'