Skip to content

fix: deployment fix #131

fix: deployment fix

fix: deployment fix #131

Workflow file for this run

name: Flask Backend Tests
on:
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
env:
PG: ${{ secrets.PG }}
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
TESTING_PG: ${{ secrets.TESTING_PG }}
TESTING_JWT_SECRET_KEY: ${{ secrets.TESTING_JWT_SECRET_KEY }}
TESTING_SECRET_KEY: ${{ secrets.TESTING_SECRET_KEY }}
API_KEY: ${{ secrets.API_KEY }}
FORMULA_1_KEY: ${{ secrets.FORMULA_1_KEY }}
REDIS_HOST: ${{ secrets.REDIS_HOST }}
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
REDIS_PORT: ${{ secrets.REDIS_PORT }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
working-directory: tracknow/backend
- name: Run tests
run: |
python -m pytest
working-directory: tracknow/backend
- name: Run tests with code coverage
run: |
coverage run -m pytest
coverage report -m
coverage xml
working-directory: tracknow/backend
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}