Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

Commit

Permalink
Simplify coverage generation
Browse files Browse the repository at this point in the history
  • Loading branch information
zmievsa committed Sep 11, 2022
1 parent 20d3d64 commit 71ad0cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 29 deletions.
38 changes: 10 additions & 28 deletions .github/workflows/python-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
python-version: ["3.8", "3.9", "3.10"]
poetry-version: ["1.2.0"]
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# - uses: actions/setup-java@v3
# with:
# distribution: "temurin"
# java-version: "17"
# - name: Setup Cpp
# uses: aminya/setup-cpp@v1
# with:
# compiler: gcc
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: gcc
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
Expand All @@ -36,23 +36,5 @@ jobs:
run: poetry install
- name: Test
run: make test
- name: Save coverage
uses: actions/upload-artifact@v3
if: ${{ matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest' }}
with:
name: coverage
path: coverage.xml

Coverage:
needs: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: coverage
- name: Copy coverage to root
run: mv coverage/coverage.xml .
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ format:
poetry run black autograder;

test:
poetry run pytest -v --cov=autograder --cov-report=term-missing:skip-covered --cov-report=xml tests/test_examples.py::test_python --cov-fail-under=50;
poetry run pytest -v --cov=autograder --cov-report=term-missing:skip-covered --cov-report=xml tests;

update-examples:
bash update_examples.bash

0 comments on commit 71ad0cc

Please sign in to comment.