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

Generate test coverage and upload to codecov #1418

Merged
merged 1 commit into from
Jun 2, 2020
Merged
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
17 changes: 14 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: build
on: [push, pull_request]
jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -15,12 +15,23 @@ jobs:
run: |
flake8 --version
flake8
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install unit test dependencies
run: |
pip install -r requirements.txt
pip install mysqlclient
pip install mysqlclient coverage
cp .ci.settings.py dmoj/local_settings.py
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Run unit tests
run: python manage.py test judge
run: coverage run --source=. manage.py test judge
- name: Generate coverage report
run: coverage xml
- uses: codecov/codecov-action@v1