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
154 changes: 53 additions & 101 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,104 +1,56 @@
# wads CI — calls the reusable workflow hosted in i2mint/wads.
#
# All configuration comes from this repo's pyproject.toml [tool.wads.ci.*].
# To customize the workflow itself (rare), replace this file with the
# full inline template `wads/data/github_ci_uv.yml` from i2mint/wads.
#
# Pinning: `@master` floats with wads. If you need a stable job graph for
# a release-sensitive repo, change `@master` to a wads tag (e.g. `@0.2.15`;
# tags have no `v` prefix). That freezes this workflow, not the actions it
# calls, which still run at `@master`.
# CI failure does not block a published release — it blocks the publish
# step itself — so floating master is generally safe.
#
# Permissions: GitHub validates that the caller grants AT LEAST the
# permissions any job in the called workflow requests — at workflow-parse
# time, not at run-time, even if the job would be skipped via `if:`.
# The reusable workflow needs:
# contents: write for the publish job's version-bump push-back
# and for the github-pages job's gh-pages branch push
# pages: write for the github-pages job's REST API Pages config
# Both default to `write` on org-account GITHUB_TOKEN and need to be
# granted explicitly on personal-account callers (where the default is
# read-only). No `id-token: write` needed — the publish-github-pages
# action uses peaceiris/actions-gh-pages (branch-based) + REST API,
# not the OIDC `actions/deploy-pages` flow.
name: Continuous Integration
on: [push, pull_request]
env:
PROJECT_NAME: ju

jobs:
validation:
name: Validation
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.12"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# Necessary for 3.12, since setuptools was removed there
- name: Install setuptools
run: python -m pip install setuptools

- name: Install Dependencies
uses: i2mint/isee/actions/install-packages@master
with:
dependency-files: setup.cfg
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} # Uncomment this if you need to install private dependencies from source

# - name: Format Source Code
# uses: i2mint/isee/actions/format-source-code@master

# TODO: The ignore stopped working.
# - name: Pylint Validation
# uses: i2mint/isee/actions/pylint-validation@master
# with:
# root-dir: ${{ env.PROJECT_NAME }}
# enable: missing-module-docstring
# ignore: tests,examples,scrap

- name: Pytest Validation
uses: i2mint/isee/actions/pytest-validation@master
with:
root-dir: ${{ env.PROJECT_NAME }}

publish:
name: Publish
if: "!contains(github.event.head_commit.message, '[skip ci]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')"
needs: validation
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Format Source Code
uses: i2mint/isee/actions/format-source-code@master

- name: Update Version Number
uses: i2mint/isee/actions/bump-version-number@master

- name: Package
uses: i2mint/isee/actions/package@master
# Uncomment this if you need to install private dependencies from source
# with:
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Publish
uses: i2mint/isee/actions/publish@master
with:
pypi-username: ${{ secrets.PYPI_USERNAME }}
pypi-password: ${{ secrets.PYPI_PASSWORD }}

- name: Check In
uses: i2mint/isee/actions/check-in@master
with:
commit-message: "**CI** Formatted code + Updated version number and documentation. [skip ci]"
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Tag Repository With New Version Number
uses: i2mint/isee/actions/tag-repository@master
with:
tag: $VERSION

github-pages:
name: Publish GitHub Pages
if: "!contains(github.event.head_commit.message, '[skip ci]') && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)"
needs: publish
runs-on: ubuntu-latest
steps:
- uses: i2mint/epythet/actions/publish-github-pages@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ci:
uses: i2mint/wads/.github/workflows/uv-ci.yml@master
permissions:
contents: write
pages: write
# Transport (named): passes ONLY the secrets listed below — PYPI_PASSWORD
# (for the publish job) plus the secret behind each env var declared in
# [tool.wads.ci.env]. `wads-secrets add VAR_NAME` declares a var and adds
# its secret here. Every listed name must be declared by the reusable
# workflow (the superset in wads/ci_secrets.py) or GitHub rejects this
# workflow at parse time; a missing name is a one-line addition there.
# (Cross-owner `secrets: inherit` does not propagate secrets, so it
# cannot replace this list.)
#
# Opt-in alternative: `wads-migrate ci-to-stub --transport json` passes
# this repo's WHOLE secrets context — every secret it can read, including
# org-level ones — as one WADS_CI_SECRETS_JSON secret. GitHub's
# malicious-workflow scanner may hold runs that do that: `action_required`,
# zero jobs, no log (i2mint/wads#74, #101).
#
# *Which* of these become job env vars — and which are required — is
# driven entirely by [tool.wads.ci.env] in pyproject.toml; nothing is
# exported unless declared there. Non-sensitive values don't need a secret:
# use [tool.wads.ci.env].defaults (committed literals) or a repository
# *variable* (`gh variable set NAME`) — declared names fall back to
# repo variables automatically.
secrets:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
1 change: 0 additions & 1 deletion docsrc/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions docsrc/Makefile

This file was deleted.

82 changes: 0 additions & 82 deletions docsrc/conf.py

This file was deleted.

18 changes: 0 additions & 18 deletions docsrc/index.rst

This file was deleted.

35 changes: 0 additions & 35 deletions docsrc/make.bat

This file was deleted.

Loading
Loading