Skip to content

Commit b2c222d

Browse files
committed
Move Integration tests to GH action
1 parent d39771b commit b2c222d

1 file changed

Lines changed: 90 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Tekton CI
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
branches: ["main"]
9+
workflow_dispatch
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
19+
jobs:
20+
e2e-tests:
21+
name: E2E tests
22+
runs-on: ubuntu-24.04
23+
strategy:
24+
fail-fast: false
25+
26+
env:
27+
GOPATH: ${{ github.workspace }}
28+
GO111MODULE: on
29+
KO_DOCKER_REPO: registry.local:5000/tekton
30+
CLUSTER_DOMAIN: c${{ github.run_id }}.local
31+
ARTIFACTS: ${{ github.workspace }}/artifacts
32+
33+
steps:
34+
- name: Harden runner
35+
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
36+
with:
37+
egress-policy: audit
38+
39+
- name: Checkout
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
with:
42+
path: ${{ github.workspace }}/src/github.com/tektoncd/triggers
43+
44+
- name: Checkout setup-kind.sh
45+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
with:
47+
repository: tektoncd/pipeline
48+
ref: d306d649df2dbd2badaba6a90459efd05c753d2f
49+
path: scripts
50+
sparse-checkout: |
51+
hack/setup-kind.sh
52+
sparse-checkout-cone-mode: false
53+
54+
- name: Set up Go
55+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
56+
with:
57+
cache-dependency-path: "${{ github.workspace }}/src/github.com/tektoncd/triggers/go.sum"
58+
go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/triggers/go.mod"
59+
60+
- name: Install dependencies
61+
working-directory: ./
62+
run: |
63+
echo '::group::install ko'
64+
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
65+
chmod +x ./ko
66+
sudo mv ko /usr/local/bin
67+
echo '::endgroup::'
68+
69+
echo '::group::create required folders'
70+
mkdir -p "${ARTIFACTS}"
71+
echo '::endgroup::'
72+
73+
echo "${GOPATH}/bin" >> "$GITHUB_PATH"
74+
75+
- name: Run tests
76+
working-directory: ${{ github.workspace }}/src/github.com/tektoncd/triggers
77+
run: |
78+
${{ github.workspace }}/scripts/hack/setup-kind.sh \
79+
--registry-url $(echo ${KO_DOCKER_REPO} | cut -d'/' -f 1) \
80+
--cluster-suffix c${{ github.run_id }}.local \
81+
--nodes 3 \
82+
--k8s-version v1.29.x \
83+
--e2e-script ./test/presubmit-tests.sh \
84+
--e2e-env ./test/e2e-tests-kind-prow.env
85+
86+
- name: Upload test results
87+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
88+
if: ${{ failure() }}
89+
with:
90+
path: ${{ env.ARTIFACTS }}

0 commit comments

Comments
 (0)