Some checks failed
CI / Lint & Check (push) Failing after 11s
- stdlib unittest suite: 38 tests for client, commands, output - fixtures/ with load_fixture() helper and sample data - -q/--quiet flag: tab-separated output, no headers - ci: package syntax check, lint, test job
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint & Check
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: python:3.11-slim
|
|
|
|
steps:
|
|
- name: Setup and checkout
|
|
run: |
|
|
apt-get update -qq && apt-get install -yqq --no-install-recommends git >/dev/null
|
|
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 -q ruff
|
|
|
|
- name: Syntax check (entrypoint)
|
|
run: python -m py_compile harbor-ctl.py
|
|
|
|
- name: Syntax check (package)
|
|
run: |
|
|
for f in src/harbor/*.py; do
|
|
python -m py_compile "$f"
|
|
done
|
|
|
|
- name: Lint (entrypoint)
|
|
run: ruff check harbor-ctl.py
|
|
|
|
- name: Lint (package)
|
|
run: ruff check src/harbor/
|
|
|
|
- name: Run tests
|
|
run: python -m unittest discover -s src/harbor/tests -v
|
|
env:
|
|
PYTHONPATH: src
|