Skip to content

Add GitHub Actions CI/CD workflows #384

Add GitHub Actions CI/CD workflows

Add GitHub Actions CI/CD workflows #384

Workflow file for this run

name: "CI"
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
permissions:
contents: read
jobs:
lint:
name: Lint and type-check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python 3.12
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff mypy tld types-redis types-requests python-dateutil
- name: Run ruff format check
run: ruff format --check *.py whoisdomain/
- name: Run ruff lint
run: ruff check *.py whoisdomain/
- name: Run mypy (strict)
run: mypy --strict --no-incremental *.py whoisdomain/
build:
name: Build distribution packages
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python 3.12
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build hatchling
- name: Build sdist and wheel
run: python -m build
- name: Upload built artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: dist
path: dist/