Skip to content

Commit

Permalink
ch: Use GitHub Actions #9
Browse files Browse the repository at this point in the history
  • Loading branch information
toolen committed Jan 8, 2021
1 parent 9823c27 commit d6f843a
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,30 @@ jobs:
with:
python-version: 3.8

- name: Install Poetry
uses: snok/install-poetry@v1.1.1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --no-interaction --no-ansi
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
source $HOME/.poetry/env
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'

- name: Lint with flake8
run: |
source .venv/bin/activate
flake8 --ignore E501 passgen tests
- name: Test with pytest
run: |
source .venv/bin/activate
py.test --cov=passgen tests/
coveralls

0 comments on commit d6f843a

Please sign in to comment.