Skip to content

Commit 8cb6ff3

Browse files
committed
👷 uv + taskfile
1 parent a616554 commit 8cb6ff3

File tree

13 files changed

+1499
-1493
lines changed

13 files changed

+1499
-1493
lines changed

.github/workflows/lint.yaml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
name: Lint
22

33
on:
4-
pull_request:
5-
branches: ["**"]
4+
pull_request:
5+
branches: ["**"]
66

77
jobs:
8-
lint:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: lint
12-
uses: juftin/actions/taskfile@v1
13-
continue-on-error: true
14-
with:
15-
checkout: true
16-
setup-uv: true
17-
task: lint
18-
install: true
19-
github-token: ${{ secrets.GITHUB_TOKEN }}
20-
annotations-ruff: true
21-
- name: check
22-
uses: juftin/actions/taskfile@v1
23-
continue-on-error: true
24-
with:
25-
task: check
26-
setup-task: false
27-
annotations-mypy: true
28-
- name: Raise Errors For Failures
29-
if: |
30-
steps.lint.outcome != 'success' || steps.check.outcome != 'success'
31-
run: |
32-
echo "Lint: ${{ steps.lint.outcome }}"
33-
echo "Check: ${{ steps.check.outcome }}"
34-
exit 1
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: lint
12+
uses: juftin/actions/taskfile@v1
13+
continue-on-error: true
14+
with:
15+
checkout: true
16+
setup-uv: true
17+
task: lint
18+
install: true
19+
github-token: ${{ secrets.GITHUB_TOKEN }}
20+
annotations-ruff: true
21+
- name: check
22+
uses: juftin/actions/taskfile@v1
23+
continue-on-error: true
24+
with:
25+
task: check
26+
setup-task: false
27+
annotations-mypy: true
28+
- name: Raise Errors For Failures
29+
if: |
30+
steps.lint.outcome != 'success' || steps.check.outcome != 'success'
31+
run: |
32+
echo "Lint: ${{ steps.lint.outcome }}"
33+
echo "Check: ${{ steps.check.outcome }}"
34+
exit 1

.github/workflows/publish.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
name: Publishing
22

33
on:
4-
release:
5-
types:
6-
- published
4+
release:
5+
types:
6+
- published
77

88
jobs:
9-
pypi-publish:
10-
name: PyPI
11-
if: github.repository_owner == 'juftin'
12-
runs-on: ubuntu-latest
13-
environment:
14-
name: pypi
15-
url: https://pypi.org/p/browsr
16-
permissions:
17-
id-token: write
18-
steps:
19-
- name: build
20-
uses: juftin/actions/taskfile@v1
21-
with:
22-
checkout: true
23-
setup-uv: true
24-
task: build
25-
github-token: ${{ secrets.GITHUB_TOKEN }}
26-
- name: Publish package on PyPI
27-
uses: pypa/gh-action-pypi-publish@release/v1
9+
pypi-publish:
10+
name: PyPI
11+
if: github.repository_owner == 'juftin'
12+
runs-on: ubuntu-latest
13+
environment:
14+
name: pypi
15+
url: https://pypi.org/p/browsr
16+
permissions:
17+
id-token: write
18+
steps:
19+
- name: build
20+
uses: juftin/actions/taskfile@v1
21+
with:
22+
checkout: true
23+
setup-uv: true
24+
task: build
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Publish package on PyPI
27+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/release.yaml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
name: release
22
on:
3-
push:
4-
branches: [main, next, beta, alpha, "*.x"]
3+
push:
4+
branches: [main, next, beta, alpha, "*.x"]
55
jobs:
6-
release:
7-
name: release
8-
if: github.repository_owner == 'juftin'
9-
runs-on: ubuntu-latest
10-
permissions:
11-
contents: write
12-
issues: write
13-
pull-requests: write
14-
steps:
15-
- name: setup
16-
uses: juftin/actions/taskfile@v1
17-
with:
18-
checkout: true
19-
setup-uv: true
20-
task: run
21-
install: true
22-
github-token: ${{ secrets.GITHUB_TOKEN }}
23-
args: "echo Beginning..."
24-
- name: Semantic Release
25-
uses: juftin/actions/semantic-release@v1
26-
with:
27-
github_token: ${{ secrets.GITHUB_TOKEN }}
6+
release:
7+
name: release
8+
if: github.repository_owner == 'juftin'
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
issues: write
13+
pull-requests: write
14+
steps:
15+
- name: setup
16+
uses: juftin/actions/taskfile@v1
17+
with:
18+
checkout: true
19+
setup-uv: true
20+
task: run
21+
install: true
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
args: "echo Beginning..."
24+
- name: Semantic Release
25+
uses: juftin/actions/semantic-release@v1
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
2828

29-
docs:
30-
name: docs
31-
runs-on: ubuntu-latest
32-
permissions:
33-
pages: write
34-
id-token: write
35-
environment:
36-
name: github-pages
37-
url: ${{ steps.deployment.outputs.page_url }}
38-
steps:
39-
- name: build-docs
40-
uses: juftin/actions/taskfile@v1
41-
with:
42-
checkout: true
43-
setup-uv: true
44-
task: docs
45-
install: true
46-
github-token: ${{ secrets.GITHUB_TOKEN }}
47-
args: build
48-
- name: Publish Docs
49-
uses: juftin/actions/github-pages@v1
50-
id: deployment
29+
docs:
30+
name: docs
31+
runs-on: ubuntu-latest
32+
permissions:
33+
pages: write
34+
id-token: write
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
steps:
39+
- name: build-docs
40+
uses: juftin/actions/taskfile@v1
41+
with:
42+
checkout: true
43+
setup-uv: true
44+
task: docs
45+
install: true
46+
github-token: ${{ secrets.GITHUB_TOKEN }}
47+
args: build
48+
- name: Publish Docs
49+
uses: juftin/actions/github-pages@v1
50+
id: deployment

.github/workflows/tests.yaml

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
name: Tests
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
paths:
8-
- browsr/**
9-
- pyproject.toml
10-
- .github/workflows/tests.yaml
11-
pull_request:
12-
branches: ["**"]
13-
paths:
14-
- browsr/**
15-
- pyproject.toml
16-
- .github/workflows/tests.yaml
17-
schedule:
18-
- cron: 0 12 1 * *
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- browsr/**
9+
- pyproject.toml
10+
- .github/workflows/tests.yaml
11+
pull_request:
12+
branches: ["**"]
13+
paths:
14+
- browsr/**
15+
- pyproject.toml
16+
- .github/workflows/tests.yaml
17+
schedule:
18+
- cron: 0 12 1 * *
1919
jobs:
20-
test-suite:
21-
runs-on: ubuntu-latest
22-
strategy:
23-
fail-fast: true
24-
matrix:
25-
include:
26-
- { name: Python 3.13, python: "3.13" }
27-
- { name: Python 3.12, python: "3.12" }
28-
- { name: Python 3.11, python: "3.11" }
29-
- { name: Python 3.10, python: "3.10" }
30-
- { name: Python 3.10, python: "3.9" }
31-
permissions:
32-
contents: read
33-
id-token: write
34-
pull-requests: write
35-
steps:
36-
- name: test
37-
uses: juftin/actions/taskfile@v1
38-
with:
39-
checkout: true
40-
setup-uv: true
41-
task: test
42-
install: true
43-
github-token: ${{ secrets.GITHUB_TOKEN }}
44-
annotations-pytest: ${{ matrix.python == '3.12' && true || false }}
45-
pytest-coverage: ${{ matrix.python == '3.12' && true || false }}
46-
env:
47-
UV_PYTHON: ${{ matrix.python }}
20+
test-suite:
21+
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: true
24+
matrix:
25+
include:
26+
- { name: Python 3.13, python: "3.13" }
27+
- { name: Python 3.12, python: "3.12" }
28+
- { name: Python 3.11, python: "3.11" }
29+
- { name: Python 3.10, python: "3.10" }
30+
- { name: Python 3.10, python: "3.9" }
31+
permissions:
32+
contents: read
33+
id-token: write
34+
pull-requests: write
35+
steps:
36+
- name: test
37+
uses: juftin/actions/taskfile@v1
38+
with:
39+
checkout: true
40+
setup-uv: true
41+
task: test
42+
install: true
43+
github-token: ${{ secrets.GITHUB_TOKEN }}
44+
annotations-pytest: ${{ matrix.python == '3.12' && true || false }}
45+
pytest-coverage: ${{ matrix.python == '3.12' && true || false }}
46+
env:
47+
UV_PYTHON: ${{ matrix.python }}

.pre-commit-config.yaml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# yaml-language-server: $schema=https://schemastore.org/pre-commit-config.json
2+
23
repos:
34
- repo: https://github.com/pre-commit/pre-commit-hooks
45
rev: v6.0.0
@@ -11,25 +12,13 @@ repos:
1112
- id: check-merge-conflict
1213
- id: mixed-line-ending
1314
- id: no-commit-to-branch
14-
- repo: https://github.com/google/yamlfmt
15-
rev: v0.17.2
16-
hooks:
17-
- id: yamlfmt
15+
1816
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
1917
rev: v2.15.0
2018
hooks:
2119
- id: pretty-format-toml
2220
args: [--autofix, --no-sort]
23-
- repo: https://github.com/hukkin/mdformat
24-
rev: 0.7.22
25-
hooks:
26-
- id: mdformat
27-
args: ["--number"]
28-
additional_dependencies:
29-
- mdformat-gfm
30-
- mdformat-gfm-alerts
31-
- mdformat-ruff
32-
- mdformat-config
21+
3322
- repo: local
3423
hooks:
3524
- id: ruff-format
@@ -46,3 +35,17 @@ repos:
4635
language: system
4736
types:
4837
- python
38+
- id: prettier
39+
name: prettier
40+
description: Runs Prettier Code Formatter
41+
entry: prettier --write --ignore-unknown
42+
language: node
43+
types:
44+
- text
45+
additional_dependencies:
46+
47+
exclude: |
48+
(?x)(
49+
^docs/|
50+
.github/semantic_release/release_notes.hbs
51+
)

0 commit comments

Comments
 (0)