-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,20 +35,46 @@ jobs: | |
run: | | ||
poetry config virtualenvs.in-project true | ||
poetry install | ||
- name: Run style checks | ||
run: | | ||
make check-codestyle | ||
# Test MiV-OS using pytest | ||
- name: Run tests | ||
run: | | ||
make test | ||
report-coverage: # Report coverage from python 3.8 and mac-os. May change later | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.8"] | ||
os: [macos-latest] | ||
include: | ||
- os: macos-latest | ||
path: ~/Library/Caches/pip | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ matrix.path }} | ||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
poetry config virtualenvs.in-project true | ||
poetry install | ||
# Set environment variables for coverage test. Coverage test is done using python 3.8 | ||
# Test MiV-OS using pytest | ||
- name: Run style checks | ||
run: | | ||
make check-codestyle | ||
- name: Test MiV-OS using pytest | ||
if: startsWith(runner.os, 'macOS') | ||
run: | | ||
if [[ "${{ matrix.python-version }}" == "3.8" ]]; then | ||
poetry run pytest -c pyproject.toml --cov=miv --cov-report=xml | ||
fi | ||
poetry run pytest -c pyproject.toml --cov=miv --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
|