Skip to content

Commit

Permalink
feat: add GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed Nov 11, 2024
1 parent cbf5ba1 commit fe48678
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2

updates:
- package-ecosystem: pip
directory: /
schedule:
interval: daily
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on: [push, fork, pull_request, workflow_dispatch]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
pip install uv --disable-pip-version-check
uvx pdm export --pyproject | uv pip install -r - --system
yarn global add pyright
- name: Check code quality
run: |
ruff check --diff
isort . --check --diff
black . --check --diff
- name: Check typing
run: pyright

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: pip install uv --disable-pip-version-check
- name: Build
run: uv build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist

publish:
runs-on: ubuntu-latest
needs: [check, build]
permissions:
id-token: write
if: github.event_name != 'pull_request'
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish to PyPI
run: |
pip install uv --disable-pip-version-check
uv publish
continue-on-error: true

0 comments on commit fe48678

Please sign in to comment.