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: .