Skip to content

Setup Tests for Monorepo #26

Setup Tests for Monorepo

Setup Tests for Monorepo #26

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r api/requirements.txt
- name: Run backend tests
run: |
export PYTHONPATH=$(pwd)
pytest --cov=api api/tests/ --cov-report=xml
- name: test from GH search
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: test public claim
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Backend Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: BE Upload coverage to Codecov test with token
uses: codecov/codecov-action@v4
env:
token: ${{ secrets.CODECOV_TOKEN }}
- name: BE Upload with CodeCov CLI based on Sentry repo
run: |
codecovcli create-commit
codecovcli create-report
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Test some config crap i found in sentry tepo
if: ${{ always() }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: smart-tests
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install frontend dependencies
run: npm install
- name: Run frontend tests
run: npm run test
- name: Frontend Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}