Skip to content

style(all): fixing pipelines #3117

style(all): fixing pipelines

style(all): fixing pipelines #3117

Workflow file for this run

name: Unit Tests
on:
pull_request:
branches: [dev, main, 331-staging]
jobs:
event_file:
name: Event File
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}
backend:
name: Backend CI Testing
runs-on: ubuntu-latest
if: false
permissions:
checks: write
pull-requests: write
steps:
- name: Checking out repository
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements.txt
- name: Set up env
run: >
python3
setup_env.py
--default
--sessionsdb_username="github_ci"
--sessionsdb_password="github_ci"
--sessionsdb_service_hostname="sessionsdb"
--mongodb_username="github_ci"
--mongodb_password="github_ci"
--mongodb_service_hostname="mongodb"
- name: Run the backend container
run: docker compose up -d ci-backend
- name: Run mypy checks
run: cd backend && python -m mypy . && cd ..
- name: Test algorithm with pytest
run: |
cd backend
pip install pytest-cov
python -m pytest --junitxml=junit/be-test-results.xml --cov=. --cov-report=xml --cov-report=html
- uses: actions/upload-artifact@v3 # upload test results
if: always()
with:
name: be-test-results
path: backend/junit/be-test-results.xml # Path to test results
frontend:
name: Frontend CI Testing
runs-on: ubuntu-latest
if: false
steps:
- name: Checking out repository
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install frontend
run: cd frontend && npm ci
- name: Run frontend types
if: always()
run: cd frontend && npm run lint
- name: Run frontend lint
if: always()
run: cd frontend && npm run types
- name: Run frontend tests
if: false # disable these tests for now
run: cd frontend && npm run test
- uses: actions/upload-artifact@v3
if: false # always()
with:
name: fe-test-results
path: frontend/junit/fe-test-results.xml
- name: Install dotenv for env setup
run: |
python -m pip install --upgrade pip
pip install dotenv
- name: Set up env
run: >
python3
setup_env.py
--default
--sessionsdb_username="github_ci"
--sessionsdb_password="github_ci"
--sessionsdb_service_hostname="sessionsdb"
--mongodb_username="github_ci"
--mongodb_password="github_ci"
--mongodb_service_hostname="mongodb"
- name: Test the frontend successfully builds
run: docker compose up -d frontend-prod
lol:
name: lolol
runs-on: ubuntu-latest
steps:
- name: Checking out repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Setup Env
uses: ./.github/actions/setup-ci-env