-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
73 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,24 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
uses: abatilo/actions-poetry@v3 | ||
|
||
- name: Use local virtual environment | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- uses: actions/cache@v4 | ||
id: cache-poetry-deps | ||
name: Cache Poetry dependencies | ||
with: | ||
poetry-version: 1.3.2 | ||
path: ./.venv | ||
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | ||
restore-keys: | | ||
venv-${{ matrix.os }}-${{ matrix.python-version }}- | ||
- name: Install dependencies | ||
- name: Install dependencies with Poetry | ||
if: steps.cache-poetry-deps.outputs.cache-hit != 'true' | ||
run: poetry install | ||
|
||
- name: Test package building | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ on: | |
- master | ||
pull_request: | ||
|
||
env: | ||
RUNS_ON: ubuntu-latest | ||
|
||
jobs: | ||
pre-commit: | ||
name: Pre-commit | ||
|
@@ -23,11 +26,38 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
uses: abatilo/actions-poetry@v3 | ||
|
||
- name: Use local virtual environment | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- uses: actions/cache@v4 | ||
id: cache-poetry-deps | ||
name: Cache Poetry dependencies | ||
with: | ||
path: ./.venv | ||
key: venv-${{ env.RUNS_ON }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | ||
restore-keys: | | ||
venv-${{ env.RUNS_ON }}-${{ matrix.python-version }}- | ||
- uses: actions/cache@v4 | ||
name: Cache pre-commit hooks | ||
with: | ||
poetry-version: 1.3.2 | ||
path: ~/.cache/pre-commit/ | ||
key: > | ||
${{ format('pre-commit-{0}-{1}-{2}', | ||
env.RUNS_ON, | ||
matrix.python-version, | ||
hashFiles('.pre-commit-config.yaml') | ||
) }} | ||
restore-keys: | | ||
pre-commit-${{ env.RUNS_ON }}-${{ matrix.python-version }}- | ||
pre-commit-${{ env.RUNS_ON }}- | ||
- name: Install dependencies | ||
- name: Install dependencies with Poetry | ||
if: steps.cache-poetry-deps.outputs.cache-hit != 'true' | ||
run: poetry install | ||
|
||
- name: Run pre-commit on all files | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ on: | |
release: | ||
types: [published] | ||
|
||
env: | ||
RUNS_ON: ubuntu-latest | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
|
@@ -21,11 +24,24 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
uses: abatilo/actions-poetry@v3 | ||
|
||
- name: Use local virtual environment | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- uses: actions/cache@v4 | ||
id: cache-poetry-deps | ||
name: Cache Poetry dependencies | ||
with: | ||
poetry-version: 1.3.2 | ||
path: ./.venv | ||
key: venv-${{ env.RUNS_ON }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | ||
restore-keys: | | ||
venv-${{ env.RUNS_ON }}-${{ matrix.python-version }}- | ||
- name: Install dependencies | ||
- name: Install dependencies with Poetry | ||
if: steps.cache-poetry-deps.outputs.cache-hit != 'true' | ||
run: poetry install | ||
|
||
- name: Set version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters