♻️✅ Refactor config parsing, add tests for co… #10
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: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Cache Poetry virtualenv | |
uses: actions/cache@v1 | |
id: cache | |
with: | |
path: ~/.virtualenvs | |
key: poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
poetry-${{ hashFiles('**/poetry.lock') }} | |
- name: Set Poetry config | |
run: | | |
poetry config settings.virtualenvs.in-project false | |
poetry config settings.virtualenvs.path ~/.virtualenvs | |
- name: Install Dependencies | |
run: poetry install --with dev | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Test with pytest | |
run: | | |
cd ./tests | |
poetry python init.py | |
poetry run pytest --cov . |