28 lines
604 B
YAML
28 lines
604 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
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
|