forked from knative/func
-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (68 loc) · 2.56 KB
/
test-integration.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Func Integration Test
on: [pull_request]
jobs:
test:
name: Integration Test
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Remove Unnecessary Software
run: |
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /opt/ghc || true
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
echo "TEKTON_TESTS_ENABLED=1" >> "$GITHUB_ENV"
echo "GITLAB_TESTS_ENABLED=1" >> "$GITHUB_ENV"
echo "GITLAB_HOSTNAME=gitlab.127.0.0.1.sslip.io" >> "$GITHUB_ENV"
echo "GITLAB_ROOT_PASSWORD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32})" >> "$GITHUB_ENV"
echo "PAC_CONTROLLER_HOSTNAME=pac-ctr.127.0.0.1.sslip.io" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: imjasonh/setup-ko@v0.6
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Local Registry
run: ./hack/registry.sh
- name: Allocate Cluster
run: ./hack/allocate.sh
- name: Setup testing images
run: ./hack/setup-testing-images.sh
- name: Install Tekton
run: ./hack/install-tekton.sh
- name: Install Pipelines as Code
run: ./hack/install-pac.sh
- name: Install Gitlab
run: ./hack/install-gitlab.sh
- name: Patch Hosts
run: ./hack/patch-hosts.sh
- name: Integration Test
env:
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
run: make test-integration
- name: Dump Cluster Logs
if: always()
run: |
echo "::group::cluster events" >> cluster_log.txt
kubectl get events -A >> cluster_log.txt 2>&1
echo "::endgroup::" >> cluster_log.txt
echo "::group::cluster containers logs" >> cluster_log.txt
stern '.*' --all-namespaces --no-follow >> cluster_log.txt 2>&1
echo "::endgroup::" >> cluster_log.txt
- name: "Archive log results"
if: always()
uses: actions/upload-artifact@v4
with:
name: cluster-logs
path: ./cluster_log.txt
retention-days: 7
- uses: codecov/codecov-action@v4
with:
files: ./coverage.txt
flags: integration-tests