-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
40 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 |
---|---|---|
|
@@ -5,10 +5,28 @@ on: | |
tags: | ||
- "v*.*.*" | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff mypy | ||
test: | ||
needs: lint | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
|
||
max-parallel: 1 | ||
fail-fast: true | ||
matrix: | ||
|
@@ -20,7 +38,6 @@ jobs: | |
TOGGL_API_TOKEN: ${{ secrets.TOGGL_API_TOKEN }} | ||
GH_ACTION: "ACTION" | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -32,14 +49,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
pip install tox-gh-actions tox ruff mypy | ||
- name: Type check | ||
run: mypy toggl_api | ||
|
||
- name: Lint code | ||
run: ruff check toggl_api | ||
pip install poetry tox-gh-actions tox ruff mypy | ||
- name: Run tests | ||
run: tox | ||
|
@@ -54,7 +64,21 @@ jobs: | |
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff mypy | ||
- name: Generate Stubs | ||
run: stubgen toggl_api/ | ||
|
||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "toggl-api-wrapper" | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
description = "Simple Toggl API wrapper for non-premium features." | ||
authors = ["David Kasakaitis <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -100,6 +100,7 @@ indent-width = 4 | |
target-version = "py312" | ||
|
||
[tool.ruff.lint] | ||
preview = true | ||
select = [ | ||
"F", | ||
"E", | ||
|
@@ -162,7 +163,7 @@ ignore = [ | |
"N802", | ||
"PLW2901", | ||
"UP017", # Python 3.10 backwards compatiblity | ||
|
||
"PLR6301", # Class Method Suggestion | ||
] | ||
# Allow fix for all enabled rules (when `--fix`) is provided. | ||
fixable = ["ALL"] | ||
|
@@ -176,7 +177,7 @@ indent-style = "space" | |
skip-magic-trailing-comma = false | ||
line-ending = "auto" | ||
|
||
[tool.ruff.per-file-ignores] | ||
[tool.ruff.lint.per-file-ignores] | ||
"docs/examples/*" = ["INP001", "T201"] | ||
|
||
[tool.mypy] | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
version = "0.1.0" | ||
version = "0.1.1" |