summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-11-20 01:17:40 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2024-11-20 01:17:40 -0500
commit3e3ebe586385a83b10c8f1d0b9ba9b67c8b56d2f (patch)
tree5682f748fc9867166043734aad44e1734d16abeb /.github/workflows
parentfa197fe27b8a03bbf4504476f842956ece2c76c9 (diff)
New upstream version 2.0.0.upstream/2.0.0
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/docs_publish.yml32
-rw-r--r--.github/workflows/docs_source_update.yml37
-rw-r--r--.github/workflows/formatting_check.yml26
-rw-r--r--.github/workflows/linting_check.yml26
-rw-r--r--.github/workflows/pypi-publish-release.yml12
-rw-r--r--.github/workflows/unit_tests.yml25
6 files changed, 152 insertions, 6 deletions
diff --git a/.github/workflows/docs_publish.yml b/.github/workflows/docs_publish.yml
new file mode 100644
index 0000000..af146b2
--- /dev/null
+++ b/.github/workflows/docs_publish.yml
@@ -0,0 +1,32 @@
+name: build and publish docs
+
+on:
+ push:
+ tags:
+ - "v*"
+ branches: # for testing
+ - main
+
+jobs:
+ build:
+ name: build and publish docs
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5.3.0
+ with:
+ python-version: 3.12
+
+ - name: Install sphinx
+ run: pip install sphinx
+
+ - name: Build docs
+ run: cd docs && make html
+
+ - name: Publish docs to GitHub Pages
+ uses: peaceiris/actions-gh-pages@v4
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: docs/build/html
diff --git a/.github/workflows/docs_source_update.yml b/.github/workflows/docs_source_update.yml
new file mode 100644
index 0000000..c80ee0b
--- /dev/null
+++ b/.github/workflows/docs_source_update.yml
@@ -0,0 +1,37 @@
+name: update docs source
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - pkb_client/**
+
+jobs:
+ update:
+ name: update docs source
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5.3.0
+ with:
+ python-version: 3.12
+
+ - name: Install sphinx
+ run: pip install sphinx
+
+ - name: Build docs source
+ run: sphinx-apidoc -f -o docs/source pkb_client
+
+ - name: Open PR with changes
+ uses: peter-evans/create-pull-request@v7
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ title: "[Docs]: update docs source"
+ commit-message: "update docs source"
+ branch: "docs_source_update"
+ delete-branch: true
+ label: "docs-update"
+ add-paths: docs/source
diff --git a/.github/workflows/formatting_check.yml b/.github/workflows/formatting_check.yml
new file mode 100644
index 0000000..fadbadd
--- /dev/null
+++ b/.github/workflows/formatting_check.yml
@@ -0,0 +1,26 @@
+name: formatting check
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ formatting-check:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: [ "3.13" ]
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5.3.0
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install requirements
+ run: pip install -r requirements.txt
+
+ - name: Check formatting
+ run: ruff format --check
diff --git a/.github/workflows/linting_check.yml b/.github/workflows/linting_check.yml
new file mode 100644
index 0000000..e223b36
--- /dev/null
+++ b/.github/workflows/linting_check.yml
@@ -0,0 +1,26 @@
+name: linting check
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ linting-check:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: [ "3.13" ]
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5.3.0
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install requirements
+ run: pip install -r requirements.txt
+
+ - name: Check formatting
+ run: ruff check
diff --git a/.github/workflows/pypi-publish-release.yml b/.github/workflows/pypi-publish-release.yml
index 2071faa..5150277 100644
--- a/.github/workflows/pypi-publish-release.yml
+++ b/.github/workflows/pypi-publish-release.yml
@@ -10,12 +10,12 @@ jobs:
name: Build distribution
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@master
+ - uses: actions/checkout@v4
- - name: Set up Python 3.6
- uses: actions/setup-python@v2
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5.3.0
with:
- python-version: 3.6
+ python-version: 3.9
- name: Install pep517
run: >-
@@ -34,7 +34,7 @@ jobs:
.
- name: Upload distribution artifact for other jobs
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: pkb_client_dist
path: dist/
@@ -45,7 +45,7 @@ jobs:
needs: build
steps:
- name: Download distribution from build job
- uses: actions/download-artifact@v2
+ uses: actions/download-artifact@v4
with:
name: pkb_client_dist
path: dist/
diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml
new file mode 100644
index 0000000..53e60e1
--- /dev/null
+++ b/.github/workflows/unit_tests.yml
@@ -0,0 +1,25 @@
+name: unit tests
+
+on:
+ push:
+
+jobs:
+ tests:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5.3.0
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install requirements
+ run: pip install -r requirements.txt
+
+ - name: Run unit tests
+ run: python -m unittest tests/client.py