Skip to content

Commit

Permalink
update: github action config
Browse files Browse the repository at this point in the history
  • Loading branch information
skim0119 committed May 23, 2022
1 parent 7c44d58 commit 2550c2a
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2550c2a

Please sign in to comment.