Skip to content

Commit

Permalink
github/poetry: Add poetry action
Browse files Browse the repository at this point in the history
Signed-off-by: Arisu Tachibana <arisu.tachibana@miraclelinux.com>
  • Loading branch information
aliceinwire committed Sep 11, 2024
1 parent 013bc3f commit 6d954db
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/black.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/poetry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Poetry

on: [push, pull_request]

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
# see details (matrix, python-version, python-version-file, etc.)
# https://github.com/actions/setup-python
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install
- name: Run the automated tests (for example)
run: poetry run black --check --verbose .
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
]

[tool.poetry.dependencies]
python = "^3.12"
python = "^3.10"
click = "^8.1.7"
requests = "^2.32.3"
toml = "^0.10.2"
Expand Down

0 comments on commit 6d954db

Please sign in to comment.