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: 21 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Setup
inputs:
github-token:
required: true
runs:
using: composite
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Set up poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '2.1.1'
- name: Install dependencies
shell: bash
run: poetry install --all-extras
- name: Lint
shell: bash
run: poetry run poe lint
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI
on:
push:
branches:
- main
paths-ignore:
- '**.md'
jobs:
test:
name: Test
uses: ./.github/workflows/test.yaml
tag:
name: Tag
needs: test
permissions:
contents: write
uses: ./.github/workflows/tag.yaml
# TODO: Publish to Pypi.
38 changes: 0 additions & 38 deletions .github/workflows/ci.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/pr-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ jobs:
task_types: '["build","chore","ci","deps","docs","feat","fix","perf","refactor","revert","test"]'
add_scope_label: true
token: ${{ secrets.GITHUB_TOKEN }}

11 changes: 11 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: PR
on:
pull_request:
branches:
- main
paths-ignore:
- '**.md'
jobs:
test:
name: Test
uses: ./.github/workflows/test.yaml
29 changes: 0 additions & 29 deletions .github/workflows/pr.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tag
on:
workflow_call:
outputs:
new-version:
value: ${{ jobs.tag.outputs.new-version }}
new-major-version:
value: ${{ jobs.tag.outputs.new-major-version }}
jobs:
tag:
name: Tag
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new-version: ${{ steps.bump-version.outputs.new_version }}
new-major-version: ${{ steps.extract-major-version.outputs.version }}
steps:
- name: Check out
uses: actions/checkout@v4
- name: Bump version and create tag
id: bump-version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Extract major version
id: extract-major-version
if: steps.bump-version.outputs.new_version != ''
run:
echo "version=${PACKAGE_VERSION%%.*}" >>"$GITHUB_OUTPUT"
env:
PACKAGE_VERSION: ${{ steps.bump-version.outputs.new_version }}
24 changes: 24 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test
on:
workflow_call:
inputs:
timeout-minutes:
required: false
type: number
default: 3
jobs:
test:
name: Test
timeout-minutes: ${{ inputs.timeout-minutes }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up
uses: ./.github/actions/setup
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
run: poetry run pytest