Skip to content

fix: apply black formatting #31

fix: apply black formatting

fix: apply black formatting #31

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
permissions:
contents: read
jobs:
backend:
name: Backend tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- name: Set up Python
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
with:
python-version: "3.12"
- name: Cache pip
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml', 'packages/schemas/pyproject.toml', 'apps/api/pyproject.toml', 'services/digital-twin/pyproject.toml', 'services/forecasting/pyproject.toml', 'services/transit-ingestion/pyproject.toml', 'services/weather-ingestion/pyproject.toml', 'services/earth-observation/pyproject.toml') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install backend
run: |
python -m pip install --upgrade pip
pip install -e ./packages/schemas
pip install -e ./services/digital-twin
pip install -e ./services/forecasting
pip install -e ./services/transit-ingestion
pip install -e ./services/weather-ingestion
pip install -e ./services/earth-observation
pip install -e ./apps/api
pip install pytest pytest-asyncio pytest-cov
- name: Run Python tests
run: python -m pytest tests/ -v --tb=short --cov=apps --cov=packages --cov=services --cov-report=xml --cov-report=term --cov-fail-under=0
env:
IRIDIUM_CORE__ENVIRONMENT: ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@968872560f81e7bdde9272853e65f2507c0eca7c
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: backend
fail_ci_if_error: false
continue-on-error: true
- name: Repository structure
run: |
test -f README.md
test -f LICENSE
test -f CONTRIBUTING.md
frontend:
name: Frontend tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- name: Set up Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: "20"
cache: npm
cache-dependency-path: apps/web/package-lock.json
- name: Install and test web
run: |
cd apps/web
npm ci
npm run test:run
continue-on-error: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@968872560f81e7bdde9272853e65f2507c0eca7c
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: apps/web/coverage
flags: frontend
fail_ci_if_error: false
continue-on-error: true