|
| 1 | +name: Integration Tests on microshift |
| 2 | + |
| 3 | +permissions: |
| 4 | + contents: read |
| 5 | + packages: write |
| 6 | + |
| 7 | +on: |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + - release-* |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 15 | + cancel-in-progress: true |
| 16 | + |
| 17 | +defaults: |
| 18 | + run: |
| 19 | + shell: bash |
| 20 | + |
| 21 | +jobs: |
| 22 | + tekton-triggers-integration-tests-microshift: |
| 23 | + runs-on: ubuntu-24.04 |
| 24 | + name: Integration Tests on microshift |
| 25 | + strategy: |
| 26 | + fail-fast: false |
| 27 | + |
| 28 | + env: |
| 29 | + SHELL: /bin/bash |
| 30 | + GOPATH: ${{ github.workspace }} |
| 31 | + GO111MODULE: on |
| 32 | + # KO_DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/ |
| 33 | + KO_DOCKER_REPO: ko.local |
| 34 | + CLUSTER_DOMAIN: ${{ github.run_id }}.local |
| 35 | + ARTIFACTS: ${{ github.workspace }}/artifacts |
| 36 | + SKIP_INITIALIZE: true |
| 37 | + SKIP_SECURITY_CTX: true |
| 38 | + SKIP_KNATIVE_EG: true |
| 39 | + DOCKER_HOST: unix:///run/podman/podman.sock |
| 40 | + |
| 41 | + steps: |
| 42 | + - name: Checkout |
| 43 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 44 | + with: |
| 45 | + path: ${{ github.workspace }}/src/github.com/tektoncd/triggers |
| 46 | + |
| 47 | + - name: Set up Go |
| 48 | + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 |
| 49 | + with: |
| 50 | + cache-dependency-path: "${{ github.workspace }}/src/github.com/tektoncd/triggers/go.sum" |
| 51 | + go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/triggers/go.mod" |
| 52 | + |
| 53 | + - name: Install Podman |
| 54 | + uses: gacts/install-podman@v1 |
| 55 | + run: | |
| 56 | + sudo podman system service -t 5000 & |
| 57 | +
|
| 58 | +
|
| 59 | + - name: Install dependencies |
| 60 | + working-directory: ./ |
| 61 | + run: | |
| 62 | + echo '::group::install ko' |
| 63 | + curl -L https://github.com/ko-build/ko/releases/download/v0.15.4/ko_0.15.4_Linux_x86_64.tar.gz | tar xzf - ko |
| 64 | + echo '::group:: install go-junit-report' |
| 65 | + go install github.com/jstemmer/go-junit-report@v0.9.1 |
| 66 | + echo '::endgroup::' |
| 67 | + chmod +x ./ko |
| 68 | + sudo mv ko /usr/local/bin |
| 69 | + echo '::endgroup::' |
| 70 | +
|
| 71 | + echo '::group::create required folders' |
| 72 | + mkdir -p "${ARTIFACTS}" |
| 73 | + echo '::endgroup::' |
| 74 | +
|
| 75 | + echo "${GOPATH}/bin" >> "$GITHUB_PATH" |
| 76 | +
|
| 77 | +# - name: Log in to the Container registry |
| 78 | +# uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 |
| 79 | +# with: |
| 80 | +# registry: ghcr.io |
| 81 | +# username: ${{ github.actor }} |
| 82 | +# password: ${{ secrets.GITHUB_TOKEN }} |
| 83 | + |
| 84 | + - name: Run tests |
| 85 | + working-directory: ${{ github.workspace }}/src/github.com/tektoncd/triggers |
| 86 | + run: | |
| 87 | + curl -L -o minc https://github.com/minc-org/minc/releases/latest/download/minc_linux_amd64 |
| 88 | + chmod +x minc |
| 89 | + curl https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml | yq 'del(.spec.template.spec.containers[]?.securityContext.runAsUser, .spec.template.spec.containers[]?.securityContext.runAsGroup)' > release |
| 90 | + export RELEASE_YAML=$(realpath release) |
| 91 | + ./minc config set provider podman |
| 92 | + ./minc create --log-level debug |
| 93 | + export KUBECONFIG=$HOME/.kube/config |
| 94 | + ${{ github.workspace }}/src/github.com/tektoncd/triggers/test/gh-e2e-tests.sh |
| 95 | +
|
| 96 | + - name: Upload test results |
| 97 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
| 98 | + if: ${{ failure() }} |
| 99 | + with: |
| 100 | + path: ${{ env.ARTIFACTS }} |
0 commit comments