Skip to content

Commit

Permalink
ci: fix poetry related actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sanzoghenzo committed Dec 18, 2020
1 parent c30183e commit 0de8de4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install poetry
uses: snok/install-poetry@v1.1.1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: poetry install --no-dev
- name: Install Poetry
uses: abatilo/actions-poetry@v2.1.0
- name: Build and publish
run: |
source $VENV
poetry build
poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
27 changes: 5 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,14 @@ jobs:
with:
# python-version: ${{ matrix.python-version }}
python-version: 3.7
- 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 Poetry
uses: abatilo/actions-poetry@v2.1.0
- name: Install dependencies
run: |
source $VENV
poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install
- name: Type checking
run: |
source $VENV
poetry run mypy src/wsl_tools
run: poetry run mypy src/wsl_tools
# - name: Test with pytest
# run: |
# source $VENV
# poetry run pytest --cov=./ --cov-report=xml
# run: poetry run pytest --cov=./ --cov-report=xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
# with:
Expand Down

0 comments on commit 0de8de4

Please sign in to comment.