Skip to content

Commit

Permalink
Merge branch 'master' into improve-update-command
Browse files Browse the repository at this point in the history
  • Loading branch information
samj1912 committed May 28, 2022
2 parents cd76204 + 48531b1 commit b2a1b03
Show file tree
Hide file tree
Showing 7 changed files with 292 additions and 276 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/docs.yml
Expand Up @@ -11,25 +11,22 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Poetry
uses: snok/install-poetry@v1.1.2
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
- name: Checkout code
uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
python-version: "3.7"
cache: "poetry"

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
run: |
poetry env use "3.7"
poetry install
- name: Deploy docs
run: poetry run portray on_github_pages -f
25 changes: 18 additions & 7 deletions .github/workflows/pypi_publish.yml
Expand Up @@ -7,20 +7,31 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Checkout code
uses: actions/checkout@v3

- name: Install poetry
run: pip install poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.7"
cache: "poetry"

- name: Install dependencies
run: |
poetry env use "3.7"
poetry install
- name: Bump version number
run: poetry version ${{ github.event.release.tag_name }}

- name: Build package
run: poetry build

- name: Publish package
run: poetry publish -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
59 changes: 0 additions & 59 deletions .github/workflows/run-tests.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/run_tests.yml
@@ -0,0 +1,41 @@
name: Run tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"

- name: Install dependencies
run: |
poetry env use python
poetry install
- name: Run Checks
run: |
bash scripts/test.sh --ci
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
uses: codecov/codecov-action@v2
25 changes: 18 additions & 7 deletions .github/workflows/test_pypi_publish.yml
Expand Up @@ -7,20 +7,31 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Checkout code
uses: actions/checkout@v3

- name: Install poetry
run: pip install poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.7"
cache: "poetry"

- name: Install dependencies
run: |
poetry env use "3.7"
poetry install
- name: Bump version number
run: poetry version ${{ github.event.release.tag_name }}

- name: Build package
run: poetry build

- name: Publish package
run: poetry publish -r testpypi -u __token__ -p ${{ secrets.TEST_PYPI_PASSWORD }}

0 comments on commit b2a1b03

Please sign in to comment.