Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/dependabot.yaml

This file was deleted.

12,494 changes: 0 additions & 12,494 deletions .github/semantic_release/package-lock.json

This file was deleted.

9 changes: 0 additions & 9 deletions .github/semantic_release/package.json

This file was deleted.

51 changes: 19 additions & 32 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,34 @@
name: Lint
name: lint

on:
pull_request:
branches: ["**"]

jobs:
lint:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Set up Github Workspace
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python Environment
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip wheel
python -m pip install -q hatch pre-commit
hatch --version
- name: Create Environment
run: hatch env create lint
- name: Lint
- name: lint
id: lint
uses: juftin/actions/taskfile@v1
continue-on-error: true
run: |
echo "::add-matcher::.github/workflows/matchers/flake8.json"
hatch run lint:style
echo "::remove-matcher owner=flake8::"
- name: Type Checking
with:
checkout: true
setup-uv: true
task: lint
install: true
github-token: ${{ secrets.GITHUB_TOKEN }}
annotations-ruff: true
- name: check
id: check
uses: juftin/actions/taskfile@v1
continue-on-error: true
run: |
echo "::add-matcher::.github/workflows/matchers/mypy.json"
hatch run lint:typing
echo "::remove-matcher owner=mypy::"
with:
task: check
setup-task: false
annotations-mypy: true
- name: Raise Errors For Failures
if: |
steps.lint.outcome != 'success' ||
steps.check.outcome != 'success'
steps.lint.outcome != 'success' || steps.check.outcome != 'success'
run: |
echo "Lint: ${{ steps.lint.outcome }}"
echo "Check: ${{ steps.check.outcome }}"
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/matchers/flake8.json

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/matchers/mypy.json

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/matchers/python.json

This file was deleted.

44 changes: 18 additions & 26 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
name: Publishing
name: publish

on:
release:
types:
- published

jobs:
pypi-publish:
name: PyPI
pypi:
name: pypi
if: github.repository_owner == 'juftin'
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.job }}
cancel-in-progress: false
environment:
name: pypi
url: https://pypi.org/p/lunchable-splitlunch
permissions:
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: build
uses: juftin/actions/taskfile@v1
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
python -m pip install -q hatch pre-commit
hatch --version
- name: Build package
run: |
hatch build
- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@v1.8.11
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
checkout: true
setup-uv: true
task: dist
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: pypi
uses: pypa/gh-action-pypi-publish@release/v1
85 changes: 24 additions & 61 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,84 +1,47 @@
name: Release
name: release
on:
push:
branches:
- main
- next
- beta
- alpha
- "*.x"
branches: [main, next, beta, alpha, "*.x"]
jobs:
release:
name: github-release
name: release
if: github.repository_owner == 'juftin'
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.job }}
cancel-in-progress: false
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 2
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Set up Python
uses: actions/setup-python@v5
persist-credentials: false
- name: setup-uv
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
- name: Semantic Release
uses: juftin/actions/semantic-release@v1
with:
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
python -m pip install -q hatch pre-commit
hatch -v env create
hatch --version
- name: Release
run: hatch run gen:release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
github-pages-publish:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

docs:
name: docs
runs-on: ubuntu-latest
needs: release
if: github.ref == 'refs/heads/main' && github.repository_owner == 'juftin'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: ${{ github.workflow }}-${{ github.job }}
cancel-in-progress: false
steps:
- name: Checkout Latest Changes
uses: actions/checkout@v4
- name: Set up Python Environment
uses: actions/setup-python@v5
- name: build-docs
uses: juftin/actions/taskfile@v1
with:
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip wheel
python -m pip install -q hatch pre-commit
hatch --version
- name: Create Virtual Environment
run: hatch env create docs
- name: Build Site
run: hatch run docs:build
- name: Setup GitHub Pages
uses: actions/configure-pages@v4
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/
- name: Deploy to GitHub Pages
checkout: true
setup-uv: true
task: docs
install: true
github-token: ${{ secrets.GITHUB_TOKEN }}
args: build
- name: Publish Docs
uses: juftin/actions/github-pages@v1
id: deployment
uses: actions/deploy-pages@v4
48 changes: 48 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: test

on:
push:
branches:
- main
paths:
- lunchable_splitlunch/**
- pyproject.toml
- uv.lock
- .github/workflows/test.yaml
pull_request:
paths:
- lunchable_splitlunch/**
- pyproject.toml
- uv.lock
- .github/workflows/test.yaml
schedule:
- cron: 0 12 1 * *
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- { name: Python 3.13, python: "3.13" }
- { name: Python 3.12, python: "3.12" }
- { name: Python 3.11, python: "3.11" }
- { name: Python 3.10, python: "3.10" }
- { name: Python 3.9, python: "3.9" }
permissions:
contents: read
id-token: write
pull-requests: write
steps:
- name: test
uses: juftin/actions/taskfile@v1
with:
checkout: true
setup-uv: true
task: test
install: true
github-token: ${{ secrets.GITHUB_TOKEN }}
annotations-pytest: ${{ matrix.python == '3.12' && true || false }}
pytest-coverage: ${{ matrix.python == '3.12' && github.event_name == 'pull_request' && true || false }}
env:
UV_PYTHON: ${{ matrix.python }}
Loading