Skip to content

duplicate fetch to loggable location #356

duplicate fetch to loggable location

duplicate fetch to loggable location #356

Workflow file for this run

---
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
FIA_API_URL: http://localhost:8001
NEXT_PUBLIC_FIA_API_URL: http://localhost:8001
run: uvicorn plotting_service.plotting_api:app &
- name: Checkout FIA-API repo
uses: actions/checkout@v4
with:
repository: fiaisis/FIA-API
ref: refactor_plotting_service_to_fia_api
path: FIA-API
- name: Install FIA-API
run: |
cd FIA-API
sudo apt-get update
sudo apt-get -y install libpq-dev gcc
python -m pip install --upgrade pip
python -m pip install --no-cache-dir .
env:
FIA_API_URL: "http://localhost:8001"
NEXT_PUBLIC_FIA_API_URL: "http://localhost:8001"
- name: Run FIA-API
run: |
cd FIA-API
uvicorn fia_api.fia_api:app --host 0.0.0.0 --port 8001 &
- name: Start backend
env:
DEV_MODE: True
CEPH_DIR: FIA-API/test/test-ceph
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