Skip to content

Commit

Permalink
Merge pull request #21 from cikay/ci-cd
Browse files Browse the repository at this point in the history
Migrate to poetry
  • Loading branch information
cikay authored Aug 13, 2022
2 parents b2895ff + bc52873 commit 27fed93
Show file tree
Hide file tree
Showing 5 changed files with 489 additions and 261 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,37 @@ name: Python application
on: [push]

jobs:
build:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install pipenv
run: pip3 install pipenv
- name: Run tests
run: |
pipenv install --python 3.10
pipenv install typing-extensions
pipenv run pytest

- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.1.14

- uses: snok/install-poetry@v1
with:
version: 1.1.12
virtualenvs-create: true
virtualenvs-in-project: true

- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'


- run: poetry install --no-interaction

- run: poetry run pytest
14 changes: 0 additions & 14 deletions Pipfile

This file was deleted.

235 changes: 0 additions & 235 deletions Pipfile.lock

This file was deleted.

Loading

0 comments on commit 27fed93

Please sign in to comment.