Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incomplete frontend tests** #117

Merged
merged 23 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: React TypeScript Tests

on:
push:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: |
npm install
npm ci
working-directory: tracknow/web

- name: Run tests
run: npm test -- --coverage
working-directory: tracknow/web

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
25 changes: 19 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python Backend CI
name: Flask Backend Tests

on:
push:
Expand All @@ -21,7 +21,8 @@ jobs:
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
Expand All @@ -30,14 +31,26 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd tracknow/backend
pip install -r requirements.txt
working-directory: tracknow/backend

- name: Run tests
run: |
cd tracknow/backend
python -m pytest
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 }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
![Contributors](https://img.shields.io/github/contributors/vantage-ola/track-now?color=green) ![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/vantage-ola/track-now)
![GitHub License](https://img.shields.io/github/license/vantage-ola/track-now)
![GitHub Tag](https://img.shields.io/github/v/tag/vantage-ola/track-now)
![tracknow api](https://img.shields.io/github/actions/workflow/status/vantage-ola/tracknow/workflow.yml)

![tracknow worflows](https://img.shields.io/github/actions/workflow/status/vantage-ola/tracknow/workflow.yml)
![tracknow code coverage](https://img.shields.io/codecov/c/github/vantage-ola/tracknow)

## Table Of Contents

Expand Down
1 change: 1 addition & 0 deletions tracknow/backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ typing_extensions==4.12.1
tzlocal==5.2
urllib3==2.2.2
Werkzeug==3.0.3
coverage
Loading
Loading