Update README org sync #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| test: | |
| name: Build and test | |
| runs-on: ubuntu-24.04 | |
| env: | |
| PACKAGE_NAME: auth-perms-sync | |
| PYTHON_VERSION: "3.11" | |
| UV_VERSION: "0.11.7" | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Guard src-py-lib subtree | |
| if: github.event_name == 'pull_request' | |
| env: | |
| ALLOW_SRC_PY_LIB_SUBTREE_CHANGE: ${{ contains(github.event.pull_request.labels.*.name, 'src-py-lib subtree') && '1' || '' }} | |
| run: ./dev/check-src-py-lib-subtree.sh --branch '${{ github.event.pull_request.base.sha }}' | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: pip | |
| - name: Install uv | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install "uv==${UV_VERSION}" | |
| - name: Validate lockfile | |
| run: uv lock --check | |
| - name: Lint | |
| run: uv run --frozen ruff check auth_perms_sync/ tests/ | |
| - name: Check formatting | |
| run: uv run --frozen ruff format --check auth_perms_sync/ tests/ | |
| - name: Type check | |
| run: uv run --frozen pyright | |
| - name: Run tests | |
| run: uv run --frozen python -m unittest discover -s tests | |
| - name: Smoke test source checkout CLI | |
| run: uv run --frozen auth-perms-sync --help >/tmp/auth-perms-sync-help.txt | |
| - name: Build wheel | |
| run: | | |
| uv build --wheel git-subtree/src-py-lib --out-dir dist --no-create-gitignore | |
| uv build --wheel --out-dir dist --no-create-gitignore | |
| - name: Smoke test installed wheel | |
| run: | | |
| python -m venv build/ci-venv | |
| . build/ci-venv/bin/activate | |
| python -m pip install --upgrade pip | |
| python -m pip install dist/src_py_lib-*.whl dist/auth_perms_sync-*.whl | |
| auth-perms-sync --help >/tmp/auth-perms-sync-installed-help.txt | |
| python -m auth_perms_sync --help >/tmp/auth-perms-sync-module-help.txt | |
| - name: Upload wheel artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: auth-perms-sync-wheel | |
| path: dist/*.whl |