Add url parameter on CS delegation request #593
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: Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1 | |
| with: | |
| toolchain: stable | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| - name: Test | |
| run: cargo test --locked | |
| integration: | |
| name: Integration tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1 | |
| with: | |
| toolchain: stable | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| - name: Test | |
| working-directory: integration-tests | |
| run: cargo test --locked | |
| e2e: | |
| name: End-to-end tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1 | |
| with: | |
| toolchain: stable | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| - name: Test | |
| run: cargo xtask e2e --logs -- --locked | |
| ess: | |
| name: ESS tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Get current branch name | |
| id: current-branch | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| - name: Check if branch exists in element-hq/ess-helm | |
| id: check-branch | |
| env: | |
| BRANCH_NAME: ${{ steps.current-branch.outputs.branch }} | |
| run: | | |
| API_URL="https://api.github.com/repos/element-hq/ess-helm/branches/$BRANCH_NAME" | |
| RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" $API_URL) | |
| if [ "$RESPONSE" = "200" ]; then | |
| echo "ref=$BRANCH_NAME" | tee -a $GITHUB_OUTPUT | |
| else | |
| echo "ref=main" | tee -a $GITHUB_OUTPUT | |
| fi | |
| - name: Install ESS test dependencies | |
| uses: element-hq/setup-ess-cluster-action@23c5b953699591752a7385e143af59607a68c85e # release/v2 | |
| with: | |
| ess-helm-ref: ${{ steps.check-branch.outputs.ref }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 | |
| with: | |
| # The buildx container needs host networking to reach the ESS | |
| # cluster's registry at localhost:5000. | |
| driver-opts: network=host | |
| - name: Build lk-jwt-service docker image to local registry | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 | |
| with: | |
| context: . | |
| push: true | |
| tags: localhost:5000/lk-jwt-service:ci | |
| cache-from: type=gha,scope=ess | |
| cache-to: type=gha,mode=max,scope=ess | |
| - name: Build Additional values file | |
| run: | | |
| yq eval -n '.matrixRTC.image.registry = "localhost:5000" | .matrixRTC.image.repository = "lk-jwt-service" | .matrixRTC.image.tag = "ci"' > ci-values.yml | |
| - name: Run ESS tests | |
| run: pytest-ess --test-suite "matrix-rtc-synapse-wellknown" --additional-test-values-file ci-values.yml -- -vv | |
| - name: Collect ESS logs | |
| if: ${{ failure() }} | |
| run: collect-ess-logs | |
| - name: Upload logs | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ess-helm-logs | |
| path: ess-helm-logs | |
| retention-days: 1 |