chore(.github/workflows): add CI workflows for commit lint, dependency audit, and install script testing
This commit is contained in:
3 files changed
+136
No files matched your search
@@ -0,0 +1,27 @@
|
|||||||
|
name: Commit Lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main, dev]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
commit-lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "22"
|
||||||
|
|
||||||
|
- name: Install commitlint
|
||||||
|
run: npm install -g @commitlint/cli @commitlint/config-conventional
|
||||||
|
|
||||||
|
- name: Lint commits
|
||||||
|
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: Dependency Audit
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, dev]
|
||||||
|
pull_request:
|
||||||
|
branches: [main, dev]
|
||||||
|
schedule:
|
||||||
|
- cron: "0 8 1 * *"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pip-audit:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.13"
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v4
|
||||||
|
|
||||||
|
- name: Export requirements from uv
|
||||||
|
run: uv export --no-hashes -o requirements-audit.txt
|
||||||
|
|
||||||
|
- uses: pypa/gh-action-pip-audit@release/v1
|
||||||
|
with:
|
||||||
|
input: requirements-audit.txt
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: rm -f requirements-audit.txt
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
name: Install Script Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, dev]
|
||||||
|
paths:
|
||||||
|
- "install.sh"
|
||||||
|
- "src/window/globalmenu/**"
|
||||||
|
- "src/window/switcher/app-capture/**"
|
||||||
|
- "pyproject.toml"
|
||||||
|
- "uv.lock"
|
||||||
|
pull_request:
|
||||||
|
branches: [main, dev]
|
||||||
|
paths:
|
||||||
|
- "install.sh"
|
||||||
|
- "src/window/globalmenu/**"
|
||||||
|
- "src/window/switcher/app-capture/**"
|
||||||
|
- "pyproject.toml"
|
||||||
|
- "uv.lock"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
syntax-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check install.sh syntax
|
||||||
|
run: bash -n install.sh
|
||||||
|
|
||||||
|
- name: Install shellcheck
|
||||||
|
run: sudo apt-get install -y shellcheck
|
||||||
|
|
||||||
|
- name: Lint install.sh
|
||||||
|
run: shellcheck install.sh
|
||||||
|
|
||||||
|
c-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: archlinux:latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
pacman -Syu --noconfirm gcc make pkgconf gtk3 meson ninja
|
||||||
|
|
||||||
|
- name: Compile globalmenu shim
|
||||||
|
run: |
|
||||||
|
gcc -shared -fPIC -O2 -o /tmp/libmenu_button_shim.so \
|
||||||
|
src/window/globalmenu/libmenu_button_shim.c \
|
||||||
|
$(pkg-config --cflags --libs gtk+-3.0) -ldl
|
||||||
|
|
||||||
|
- name: Compile app-capture
|
||||||
|
run: |
|
||||||
|
cd src/window/switcher/app-capture
|
||||||
|
meson setup builddir --wipe
|
||||||
|
meson compile -C builddir
|
||||||
|
|
||||||
|
python-compile:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.13"
|
||||||
|
|
||||||
|
- name: Compile all Python source
|
||||||
|
run: python3 -m compileall -q src
|
||||||
Reference in new issue
Block a user