This commit is contained in:
27
.gitea/workflows/ci.yml
Normal file
27
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: linux_amd64
|
||||||
|
container:
|
||||||
|
image: python:3.11-slim
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
||||||
|
"https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" .
|
||||||
|
|
||||||
|
- name: Install tools
|
||||||
|
run: pip install --quiet ruff
|
||||||
|
|
||||||
|
- name: Syntax check
|
||||||
|
run: python -m py_compile harbor-ctl.py
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: ruff check --select=E,F,W harbor-ctl.py
|
||||||
Reference in New Issue
Block a user