Skip to content

Commit

Permalink
Update library
Browse files Browse the repository at this point in the history
  • Loading branch information
mypaceshun committed Aug 25, 2023
1 parent a2b6f50 commit 366b168
Show file tree
Hide file tree
Showing 3 changed files with 725 additions and 651 deletions.
84 changes: 55 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,28 @@ jobs:
- {name: '3.9', python: '3.9', os: ubuntu-latest}
- {name: '3.8', python: '3.8', os: ubuntu-latest}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: update pip
run: pip install -U pip setuptools wheel
- name: install poetry
run: pip install poetry poetry-dynamic-versioning
- name: install libraries
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Instasll poethepoet
run: poetry self add 'poethepoet[poetry_plugin]'
- name: Instasll poetry-dynamic-versioning
run: poetry self add 'poetry-dynamic-versioning[plugin]'
- uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install libraries
run: poetry install
- name: run lint
run: poetry run poe lint
run: poetry poe lint
test:
needs: lint
name: ${{ matrix.name }}
Expand All @@ -45,20 +55,30 @@ jobs:
- {name: '3.9', python: '3.9', os: ubuntu-latest}
- {name: '3.8', python: '3.8', os: ubuntu-latest}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: update pip
run: pip install -U pip setuptools wheel
- name: install poetry
run: pip install poetry poetry-dynamic-versioning
- name: install libraries
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Instasll poethepoet
run: poetry self add 'poethepoet[poetry_plugin]'
- name: Instasll poetry-dynamic-versioning
run: poetry self add 'poetry-dynamic-versioning[plugin]'
- uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install libraries
run: poetry install
- name: run test
run: poetry run poe citest
run: poetry poe test
- name: upload codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -67,24 +87,30 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- if: startsWith(github.ref, 'refs/tags/v')
env:
REF: ${{ github.ref }}
run: echo "${REF##*/}"
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Update pip
run: pip install -U pip setuptools wheel
python-version: '3.11'
- name: Install poetry
run: pip install poetry poetry-dynamic-versioning
- name: Install dependent libraries
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Instasll poethepoet
run: poetry self add 'poethepoet[poetry_plugin]'
- name: Instasll poetry-dynamic-versioning
run: poetry self add 'poetry-dynamic-versioning[plugin]'
- uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install libraries
run: poetry install
- name: Build package
run: poetry build
- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: 'dist'
path: 'dist'
Expand Down

0 comments on commit 366b168

Please sign in to comment.