From 8b6cc7d2aa86747cf5654ef086bc171d9924dbb2 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Chauvel Date: Fri, 5 Sep 2025 04:31:27 -0500 Subject: [PATCH] adding github actions (publish, ci, dependabot), fixes #8, fixes #32 --- .github/dependabot.yml | 24 ++++++++++++++++++++ .github/workflows/ci.yml | 30 +++++++++++++++++++++++++ .github/workflows/publish.yml | 41 +++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c13107c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + day: "saturday" + time: "16:00" + ignore: + - dependency-name: '*' + update-types: ['version-update:semver-patch'] + labels: ['dependencies'] + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + day: "saturday" + time: "16:00" + labels: ["dependencies"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3041a3f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +--- +name: CI + +on: + pull_request: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Install uv + uses: astral-sh/setup-uv@v6 + + - name: Installe Build Tools + run: | + sudo apt-get update && sudo apt-get install -y build-essential + + - name: Install dependencies + run: | + uv sync + + - name: Run tests + run: | + uv run pytest diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..7b2a4e7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,41 @@ + +name: Publish artifacts to PyPi + +on: + push: + branches: + - main + +jobs: + docs: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Install uv + uses: astral-sh/setup-uv@v6 + + - name: Installe Build Tools + run: | + sudo apt-get update && sudo apt-get install -y build-essential + + - name: Install dependencies + run: | + uv sync + + - name: Run tests + run: | + uv run pytest + + - name: Build artifacts + run: | + uv run build + + - name: Upload artifacts + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + run: | + uv publish -t "$PYPI_TOKEN" --managed-python