|
| 1 | +name: Pipeline |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + |
| 9 | +permissions: |
| 10 | + contents: write |
| 11 | + actions: read |
| 12 | + checks: write |
| 13 | + pull-requests: write |
| 14 | + packages: write |
| 15 | + |
| 16 | +jobs: |
| 17 | + lint-commits: |
| 18 | + name: Run Commitlint Checks |
| 19 | + if: github.event_name == 'pull_request' |
| 20 | + uses: ./.github/workflows/commitlint.yml |
| 21 | + with: |
| 22 | + ref: ${{ github.event.pull_request.head.sha }} |
| 23 | + secrets: inherit |
| 24 | + |
| 25 | + code-style: |
| 26 | + name: Run Linter Formatter |
| 27 | + uses: ./.github/workflows/linting.yml |
| 28 | + with: |
| 29 | + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} |
| 30 | + commit_changes: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} |
| 31 | + secrets: inherit |
| 32 | + |
| 33 | + compat-check: |
| 34 | + name: Run Compatibility Checks |
| 35 | + uses: ./.github/workflows/integration.yml |
| 36 | + with: |
| 37 | + library_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} |
| 38 | + sanity_ref: sanity |
| 39 | + secrets: inherit |
| 40 | + |
| 41 | + type-check: |
| 42 | + name: Run Type Checks |
| 43 | + uses: ./.github/workflows/typecheck.yml |
| 44 | + with: |
| 45 | + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} |
| 46 | + secrets: inherit |
| 47 | + |
| 48 | + run-tests: |
| 49 | + name: Run Test Suite |
| 50 | + uses: ./.github/workflows/test.yml |
| 51 | + with: |
| 52 | + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} |
| 53 | + secrets: |
| 54 | + BASE_URL: ${{ secrets.BASE_URL }} |
| 55 | + AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} |
| 56 | + JWT_KEY: ${{ secrets.JWT_KEY }} |
| 57 | + CLIENT_ID: ${{ secrets.CLIENT_ID }} |
| 58 | + CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} |
| 59 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + |
| 61 | + code-inspection: |
| 62 | + name: Run Qodana Inspections |
| 63 | + needs: run-tests |
| 64 | + uses: ./.github/workflows/qodana.yml |
| 65 | + with: |
| 66 | + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} |
| 67 | + secrets: |
| 68 | + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} |
| 69 | + |
| 70 | + all-passed: |
| 71 | + name: Check Build Status |
| 72 | + runs-on: ubuntu-latest |
| 73 | + needs: |
| 74 | + #- lint-commits |
| 75 | + - code-style |
| 76 | + - compat-check |
| 77 | + - type-check |
| 78 | + - run-tests |
| 79 | + - code-inspection |
| 80 | + if: ${{ always() && (needs.lint-commits.result == 'success' || needs.lint-commits.result == 'skipped') && needs.code-style.result == 'success' && needs.compat-check.result == 'success' && needs.type-check.result == 'success' && needs.run-tests.result == 'success' && needs.code-inspection.result == 'success' }} |
| 81 | + steps: |
| 82 | + - name: Report Success |
| 83 | + run: echo "All required checks passed successfully." |
| 84 | + |
| 85 | + release-package: |
| 86 | + name: Do Release Artifact |
| 87 | + if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
| 88 | + needs: |
| 89 | + - all-passed |
| 90 | + uses: ./.github/workflows/release.yml |
| 91 | + secrets: |
| 92 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 93 | + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |
0 commit comments