Fixes dependency paths while executing commands. #12
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
env: | |
PYTHON_VERSION: '3.11' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry- | |
- name: Configure environment | |
run: | | |
poetry config virtualenvs.in-project true | |
poetry install --with dev --sync --no-root | |
auto-review: | |
name: Auto review | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Use cached dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
- name: Run review | |
run: .venv/bin/python -m pylint src test --rcfile=.pylintrc | |
tests: | |
name: Tests | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Use cached dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
- name: Run tests | |
run: | | |
.venv/bin/python -m coverage run --rcfile=.coveragerc -m unittest discover test '*Test.py' \ | |
&& .venv/bin/python -m coverage report \ | |
&& .venv/bin/python -m coverage html |