Repository navigation
Fail with the exit code 1 when the server answers an error #197
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: tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - '*.*.*' | |
| pull_request: | |
| branches: | |
| - main | |
| - '*.*.*' | |
| env: | |
| UV_LOCKED: 1 | |
| UV_PYTHON_PREFERENCE: only-managed | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests: | |
| name: py${{ matrix.python }} unit tests | |
| runs-on: ubuntu-24.04 | |
| continue-on-error: ${{ matrix.python == '3.15' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: | |
| - '3.15' | |
| - '3.14' | |
| - '3.13' | |
| - '3.12' | |
| - '3.11' | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0 | |
| with: | |
| version: "0.12.13" | |
| python-version: ${{ matrix.python }} | |
| enable-cache: true | |
| - name: Run tests | |
| run: uv run pytest --showlocals | |
| minversions: | |
| name: minimum dependency versions | |
| runs-on: ubuntu-24.04 | |
| env: | |
| UV_RESOLUTION: lowest-direct | |
| UV_LOCKED: 0 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0 | |
| with: | |
| version: "0.12.13" | |
| python-version: "3.11" | |
| enable-cache: true | |
| - name: Install minimum dependencies | |
| run: uv sync | |
| - name: Run tests | |
| run: uv run pytest --showlocals | |
| style: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0 | |
| with: | |
| version: "0.12.13" | |
| python-version: "3.14" | |
| enable-cache: true | |
| - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
| doc: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0 | |
| with: | |
| version: "0.12.13" | |
| python-version: "3.14" | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --group doc | |
| - run: uv run sphinx-build -W --keep-going -b html doc build/sphinx/html | |
| - run: uv run sphinx-build -W --keep-going -b man doc build/sphinx/man | |
| bundle: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| # release.yml builds the published binary with the Python of the runner. | |
| UV_PYTHON_PREFERENCE: only-system | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0 | |
| with: | |
| version: "0.12.13" | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --group bundle | |
| - name: Build binary | |
| run: uv run pyinstaller --clean --log-level WARN scim2.spec | |
| - name: Check binary | |
| run: ./dist/scim2 --help | |
| nix: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: nix build | |
| - run: nix flake check | |
| container: | |
| name: container image | |
| runs-on: ubuntu-24.04 | |
| services: | |
| scim2-server: | |
| image: ghcr.io/python-scim/scim2-server:0.7.1 | |
| ports: | |
| - 8080:8080 | |
| options: >- | |
| --health-cmd "python -c 'import urllib.request; urllib.request.urlopen(\"http://127.0.0.1:8080/v2/ServiceProviderConfig\")'" | |
| --health-interval 1s | |
| --health-retries 30 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Build image | |
| run: docker build --file Containerfile --tag scim2-cli:ci . | |
| - name: Check the server compliance | |
| run: docker run --rm --network host --env SCIM_CLI_URL=http://127.0.0.1:8080/v2 scim2-cli:ci test | |
| all-checks: | |
| if: always() | |
| needs: [tests, minversions, style, doc, bundle, nix, container] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Fail if a needed job did not succeed | |
| if: >- | |
| contains(needs.*.result, 'failure') | |
| || contains(needs.*.result, 'cancelled') | |
| || contains(needs.*.result, 'skipped') | |
| run: exit 1 |