Skip to content

Commit

Permalink
Use GitHub Actions as the CI
Browse files Browse the repository at this point in the history
Move away from Semaphore and use GitHub Actions as our CI for this
project.

Semaphore doesn't have Python 12 yet for us to test against, it will
update versions once a month, and with GitHub Actions we can run it on
the CI today.

[skip changeset]
  • Loading branch information
tombruijn committed Jan 11, 2024
1 parent 2171910 commit 4301d3a
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 88 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Python package
on: [push]
jobs:
test:
name: "Test Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Install hatch"
run: "pip install hatch"
- name: "Run tests"
run: "hatch -v run test.py$(echo ${{ matrix.python-version }} | tr -d '.'):pytest"

lint-style:
name: "Style linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: "Install hatch"
run: "pip install hatch"
- name: "Run style linter"
run: "hatch -v run lint:style"

lint-typing:
name: "Typing linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: "Install hatch"
run: "pip install hatch"
- name: "Run typing linter"
run: "hatch -v run lint:typing"

lint-git:
name: "Git linter (Lintje)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch depth is required
- uses: lintje/[email protected]
65 changes: 0 additions & 65 deletions .semaphore/semaphore.yml

This file was deleted.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
# Application version
Expand Down Expand Up @@ -72,7 +73,7 @@ dependencies = [
]

[[tool.hatch.envs.test.matrix]]
python = ["38", "39", "310", "311"]
python = ["38", "39", "310", "311", "312"]

[tool.hatch.envs.lint]
detached = true
Expand Down
22 changes: 0 additions & 22 deletions script/lint_git

This file was deleted.

0 comments on commit 4301d3a

Please sign in to comment.