-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refresh license * Update pre-commit tools; use ruff for formatting * Upgrade CI bits; separate build step
- Loading branch information
Showing
4 changed files
with
43 additions
and
37 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 |
---|---|---|
@@ -1,50 +1,61 @@ | ||
name: CI | ||
'on': | ||
"on": | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- 'v*' | ||
- "v*" | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
Build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.13" | ||
- uses: astral-sh/[email protected] | ||
- run: uv build . | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist/ | ||
Test: | ||
runs-on: '${{ matrix.os }}' | ||
runs-on: "${{ matrix.os }}" | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
python-version: | ||
- '3.7' | ||
- '3.8' | ||
- '3.9' | ||
- '3.10' | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Set up Python ${{ matrix.python-version }}' | ||
uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- name: "Set up Python ${{ matrix.python-version }}" | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '${{ matrix.python-version }}' | ||
python-version: "${{ matrix.python-version }}" | ||
- run: pip install -U build pytest pytest-cov | ||
- run: py.test -vvv --cov . | ||
- run: python -m build . | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
Lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- uses: pre-commit/[email protected].0 | ||
python-version: "3.13" | ||
- uses: pre-commit/[email protected].1 | ||
Publish: | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
needs: | ||
- Test | ||
- Build | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
|
@@ -53,7 +64,7 @@ jobs: | |
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
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
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ name = "gitignorant" | |
dynamic = ["version"] | ||
description = "A parser for gitignore files" | ||
readme = "README.md" | ||
license = "" | ||
license = "MIT" | ||
requires-python = ">=3.7" | ||
authors = [ | ||
{ name = "Aarni Koskela", email = "[email protected]" }, | ||
|
@@ -33,8 +33,6 @@ include = [ | |
[tool.ruff] | ||
ignore = [] | ||
line-length = 88 | ||
select = [ | ||
"E", | ||
"F", | ||
"W", | ||
] | ||
|
||
[tool.ruff.lint] | ||
select = ["E", "F", "W"] |