From 77d2bd23c907b5712c0d1e5f62d6a29c42eba683 Mon Sep 17 00:00:00 2001 From: cxhello Date: Wed, 11 Mar 2026 21:53:56 +0800 Subject: [PATCH] ci: add GitHub Actions workflow for lint and smoke test Add CI pipeline with two jobs: - lint: ruff check with pyflakes rules (F) on v2/ directory, ignoring F401 (unused imports) for now, excluding auto-generated grpcauto directory - smoke-test: Python 3.9/3.11/3.13 matrix, verify module imports Closes #305 Signed-off-by: cxhello --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6c3199e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [master, feature/v2] + pull_request: + branches: [master, feature/v2] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + - run: pip install ruff==0.15.5 + - run: ruff check --select F --ignore F401 --exclude "*/grpcauto/*" v2/ + + smoke-test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.9', '3.11', '3.13'] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - run: pip install -r requirements.txt + - name: Smoke test v1 module + if: hashFiles('nacos/__init__.py') != '' + run: python -c "import nacos; print('v1 import ok')" + env: + PYTHONPATH: . + - name: Smoke test v2 module + run: python -c "import v2.nacos; print('v2 import ok')" + env: + PYTHONPATH: .