-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CI for testing the Sphinx Needs JS libs (#819)
* Added CI for testing the Sphinx Needs JS libs * Updated CI for JS Test * Minor bug fixes * CI fixes * Updated js_test CI workflow and .gitignore
- Loading branch information
Showing
8 changed files
with
73 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
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@v3 | ||
with: | ||
python-version: 3.10.8 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- uses: actions/[email protected] | ||
- 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@v2 | ||
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@v4 | ||
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' | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,3 @@ mem_out.* | |
|
||
pyinstrument* | ||
*.prof | ||
|
||
package-lock.json | ||
package.json |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "test-sphinx-needs", | ||
"description": "E2E tests for Sphinx Needs", | ||
"scripts": { | ||
"start": "python3 -m http.server --directory='/tmp/sphinx_build/html' 8080" | ||
} | ||
} |
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
File renamed without changes.