1
+ name : tester-linux
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows : [Build Linux artifacts]
6
+ types :
7
+ - completed
8
+
9
+ jobs :
10
+ tests :
11
+ runs-on : [self-hosted, linux, testing-farm]
12
+ strategy :
13
+ fail-fast : false
14
+ matrix :
15
+ go : ['1.21']
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ - name : Set up Go
19
+ uses : actions/setup-go@v5
20
+ with :
21
+ go-version : ${{ matrix.go }}
22
+
23
+ - name : prepare env
24
+ run : |
25
+ sudo yum install podman openssh-server git make -y
26
+ ssh-keygen -t rsa -N '' -f id_rsa -q
27
+
28
+ - name : reserve machine from testing farm
29
+ env :
30
+ TESTING_FARM_API_TOKEN : ${{ secrets.TESTING_FARM_API_TOKEN }}
31
+ run : |
32
+ export TESTING_FARM_API_TOKEN=$TESTING_FARM_API_TOKEN
33
+ eval $(ssh-agent)
34
+ testing-farm reserve --compose Fedora-40 --arch aarch64 --ssh-public-key id_rsa.pub --no-autoconnect | tee info
35
+ machine=`tail -n 1 info`
36
+ echo ${machine##*@} > host
37
+ echo "root" > username
38
+ #ssh -o StrictHostKeyChecking=no -i id_rsa root@$host
39
+
40
+ - name : Download linux binary
41
+ uses : actions/download-artifact@v4
42
+ with :
43
+ name : linux-binary
44
+ run-id : ${{ github.event.workflow_run.id }}
45
+ github-token : ${{ github.token }}
46
+
47
+ - name : Download qe oci image
48
+ id : download-qe-oci-image-artifact
49
+ uses : actions/download-artifact@v4
50
+ with :
51
+ name : crc-e2e-linux-arm64
52
+ run-id : ${{ github.event.workflow_run.id }}
53
+ github-token : ${{ github.token }}
54
+
55
+ - name : Correlate
56
+ env :
57
+ PULL_SECRET : ${{ secrets.PULL_SECRET }}
58
+ run : |
59
+ # Save pull-secret as file
60
+ echo "${PULL_SECRET}" > pull-secret
61
+
62
+ - name : Install CRC on host
63
+ run : |
64
+ podman run --rm -d --name crc-linux-install \
65
+ -e TARGET_HOST=$(cat host) \
66
+ -e TARGET_HOST_USERNAME=$(cat username) \
67
+ -e TARGET_HOST_KEY_PATH=/data/id_rsa \
68
+ -e TARGET_FOLDER=crc-support \
69
+ -e TARGET_CLEANUP='false' \
70
+ -e OUTPUT_FOLDER=/data \
71
+ -e DEBUG='true' \
72
+ -v ${PWD}:/data:z \
73
+ -v ${PWD}/crc:/opt/crc-support/crc:z \
74
+ quay.io/rhqp/crc-support:v0.6-linux crc-support/install.sh crc-support/crc
75
+ podman logs -f crc-linux-install
76
+
77
+ - name : Run CRC e2e test
78
+ run : |
79
+ # load image
80
+ podman load -i crc-e2e-linux-arm64.tar
81
+ # run
82
+ cmd="crc-qe/run.sh -junitFilename crc-e2e-junit.xml -targetFolder crc-qe"
83
+ cmd_microshift="${cmd} -e2eTagExpression '@story_microshift'"
84
+ cmd_openshift="${cmd} -e2eTagExpression '~@minimal && ~@story_microshift'"
85
+ podman run --rm -d --name crc-e2e \
86
+ -e TARGET_HOST=$(cat host) \
87
+ -e TARGET_HOST_USERNAME=$(cat username) \
88
+ -e TARGET_HOST_KEY_PATH=/data/id_rsa \
89
+ -e TARGET_FOLDER=crc-qe \
90
+ -e TARGET_RESULTS=results \
91
+ -e OUTPUT_FOLDER=/data \
92
+ -e DEBUG=true \
93
+ -v $PWD/pull-secret:/opt/crc/pull-secret:z \
94
+ -v $PWD:/data:z \
95
+ quay.io/crcont/crc-e2e:gh-linux-armd64 \
96
+ ${cmd_openshift}
97
+ podman logs -f crc-e2e
98
+
99
+ - name : Test Report
100
+ id : test-report
101
+ uses : mikepenz/action-junit-report@v4
102
+ if : always()
103
+ with :
104
+ fail_on_failure : true
105
+ include_passed : true
106
+ detailed_summary : true
107
+ require_tests : true
108
+ report_paths : ' **/*.xml'
109
+
110
+ - name : Upload e2e results
111
+ uses : actions/upload-artifact@v4
112
+ if : always()
113
+ with :
114
+ name : linux-e2e-test
115
+ path : |
116
+ **/*.xml
117
+ **/*.results
118
+ **/*.log
0 commit comments