fix: add tag trigger to main.yml workflow #693
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: main | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - 'v*' # Trigger on version tags for release workflow chain | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| identifiers: | |
| uses: wamp-proto/wamp-cicd/.github/workflows/identifiers.yml@main | |
| check: | |
| name: Code Quality Checks | |
| needs: [identifiers] | |
| runs-on: ubuntu-24.04 | |
| env: | |
| BASE_REPO: ${{ needs.identifiers.outputs.base_repo }} | |
| BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }} | |
| PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }} | |
| PR_REPO: ${{ needs.identifiers.outputs.pr_repo }} | |
| PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Install ty (Astral type checker) | |
| run: uv tool install ty | |
| - name: Create venv and install dev dependencies | |
| run: | | |
| just create cpy311 | |
| just install-dev cpy311 | |
| - name: Run code quality checks | |
| run: just check cpy311 | |
| test: | |
| name: Unit Tests (Python ${{ matrix.python-version }}) | |
| needs: [identifiers] | |
| runs-on: ubuntu-24.04 | |
| env: | |
| BASE_REPO: ${{ needs.identifiers.outputs.base_repo }} | |
| BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }} | |
| PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }} | |
| PR_REPO: ${{ needs.identifiers.outputs.pr_repo }} | |
| PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - python-version: '3.11' | |
| venv-name: cpy311 | |
| - python-version: '3.12' | |
| venv-name: cpy312 | |
| - python-version: '3.13' | |
| venv-name: cpy313 | |
| - python-version: '3.14' | |
| venv-name: cpy314 | |
| - python-version: 'pypy3.11' | |
| venv-name: pypy311 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Create venv and install dependencies | |
| run: | | |
| just create ${{ matrix.venv-name }} | |
| just install-dev ${{ matrix.venv-name }} | |
| - name: Run unit tests (trial) | |
| run: just test-trial ${{ matrix.venv-name }} | |
| - name: Run unit tests (pytest) | |
| run: just test-pytest ${{ matrix.venv-name }} | |
| - name: Smoke test (crossbar version) | |
| run: just test-smoke ${{ matrix.venv-name }} | |
| - name: Smoke test (crossbar CLI) | |
| run: just test-smoke-cli ${{ matrix.venv-name }} | |
| - name: Smoke test (crossbar init) | |
| run: just test-smoke-init ${{ matrix.venv-name }} | |
| - name: Smoke test (crossbar lifecycle) | |
| run: just test-smoke-lifecycle ${{ matrix.venv-name }} | |
| test-functional: | |
| name: Functional Tests | |
| needs: [identifiers] | |
| runs-on: ubuntu-24.04 | |
| env: | |
| BASE_REPO: ${{ needs.identifiers.outputs.base_repo }} | |
| BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }} | |
| PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }} | |
| PR_REPO: ${{ needs.identifiers.outputs.pr_repo }} | |
| PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Create venv and install dependencies | |
| run: | | |
| just create cpy311 | |
| just install-dev cpy311 | |
| - name: Run functional tests | |
| run: just test-functional cpy311 | |
| test-integration: | |
| name: Integration Tests (Python ${{ matrix.python-version }}) | |
| needs: [identifiers] | |
| runs-on: ubuntu-24.04 | |
| env: | |
| BASE_REPO: ${{ needs.identifiers.outputs.base_repo }} | |
| BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }} | |
| PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }} | |
| PR_REPO: ${{ needs.identifiers.outputs.pr_repo }} | |
| PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - python-version: '3.11' | |
| venv-name: cpy311 | |
| - python-version: '3.12' | |
| venv-name: cpy312 | |
| - python-version: '3.13' | |
| venv-name: cpy313 | |
| - python-version: '3.14' | |
| venv-name: cpy314 | |
| - python-version: 'pypy3.11' | |
| venv-name: pypy311 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Checkout autobahn-python (for examples) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: crossbario/autobahn-python | |
| path: autobahn-python | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Create venv and install dependencies | |
| run: | | |
| just create ${{ matrix.venv-name }} | |
| just install-dev ${{ matrix.venv-name }} | |
| - name: Run Autobahn integration tests | |
| run: just test-integration-ab-examples ${{ matrix.venv-name }} ./autobahn-python | |
| docs: | |
| name: Documentation Build | |
| needs: [identifiers] | |
| runs-on: ubuntu-24.04 | |
| env: | |
| BASE_REPO: ${{ needs.identifiers.outputs.base_repo }} | |
| BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }} | |
| PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }} | |
| PR_REPO: ${{ needs.identifiers.outputs.pr_repo }} | |
| PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libenchant-2-2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Create venv and install dev dependencies | |
| run: | | |
| just create cpy311 | |
| just install-dev cpy311 | |
| - name: Build documentation | |
| run: just docs cpy311 | |
| - name: Check documentation | |
| run: just docs-check cpy311 | |
| build: | |
| name: Build Distribution Packages | |
| needs: [identifiers, check, test, docs] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Create venv and install build tools | |
| run: | | |
| just create cpy311 | |
| just install-build-tools cpy311 | |
| - name: Build distribution packages | |
| run: just dist cpy311 | |
| - name: Verify packages | |
| run: just verify-dist cpy311 | |
| - name: List built packages | |
| run: | | |
| echo "Built packages:" | |
| ls -lh dist/ | |
| - name: Upload distribution artifacts (verified) | |
| uses: wamp-proto/wamp-cicd/actions/upload-artifact-verified@main | |
| with: | |
| name: dist-packages | |
| path: dist/ | |
| retention-days: 14 | |
| analyze: | |
| name: CodeQL Security Analysis | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: ['python'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: ${{ matrix.language }} | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 |