Temp build on push #375
Workflow file for this run
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: Run tests | |
on: | |
push: | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v3.5.0 | |
- name: Set up python | |
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v4.5.0 | |
with: | |
python-version: '3.12' | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install python dependencies | |
run: | | |
cd plotting-service | |
python -m pip install --upgrade pip | |
python -m pip install . | |
python -m pip install .[test] | |
- name: Run python tests | |
run: | | |
cd plotting-service | |
pytest test --random-order --random-order-bucket=global --cov --cov-report=xml | |
- name: Start backend | |
env: | |
CEPH_DIR: /home/runner/work/plotting-service/plotting-service/plotting-service/test/test_ceph | |
DEV_MODE: True | |
run: uvicorn plotting_service.plotting_api:app & | |
# We do this as the current config has production specific values (e.g. proxy and build output type) | |
# and we want defaults for testing. | |
- name: Remove production config | |
run: rm data-viewer/next.config.mjs | |
- name: cypress-run | |
uses: cypress-io/github-action@v6 | |
with: | |
build: yarn build | |
start: yarn start | |
working-directory: data-viewer | |
headed: true | |
browser: firefox | |
- name: Upload screenshots | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-snapshots | |
path: data-viewer/cypress/screenshots |