-
Notifications
You must be signed in to change notification settings - Fork 185
137 lines (135 loc) · 5.64 KB
/
acceptance_tests_common.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: acceptance-tests-common
on:
workflow_call:
inputs:
secondary_tests:
required: true
type: string
server_id:
required: true
type: string
env:
UYUNI_PROJECT: uyuni-project
UYUNI_VERSION: master
NO_AUTH_REGISTRY: no_auth_registry
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
AUTH_REGISTRY: "auth_registry"
AUTH_REGISTRY_CREDENTIALS: "cucutest|cucutest"
jobs:
paths-filter-1:
runs-on: ubuntu-latest
outputs:
require_acceptance_tests: ${{ steps.filter.outputs.java == 'true' || steps.filter.outputs.web == 'true' || steps.filter.outputs.testsuite == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
predicate-quantifier: 'every'
filters: |
java:
- 'java/**'
web:
- 'web/html/src/**'
testsuite:
- 'testsuite/**'
- '!testsuite/features/build_validation/**'
test-uyuni:
runs-on: ubuntu-22.04
needs: paths-filter-1
if: ${{ needs.paths-filter-1.outputs.require_acceptance_tests == 'true' }}
steps:
- name: fix podman
run: sudo apt install podman=3.4.4+ds1-1ubuntu1 --allow-downgrades
- name: welcome_message
run: echo "Running acceptance tests. More info at https://github.com/uyuni-project/uyuni/wiki/Running-Acceptance-Tests-at-PR"
- uses: actions/checkout@v4
- name: Cache-jar-files
uses: actions/cache@v4
with:
path: java/buildconf/ivy/repository/
key: ${{ runner.os }}-build-cache-uyuni-jars-${{ hashFiles('**/java/buildconf/ivy/*.xml') }}
restore-keys: |
${{ runner.os }}-build-cache-uyuni-jars-
- name: Cache-obs-to-maven files
uses: actions/cache@v4
with:
path: java/.obs-to-maven-cache
key: ${{ runner.os }}-build-cache-uyuni-obs-to-maven-${{ hashFiles('**/java/buildconf/ivy/obs-maven-config.yaml') }}
restore-keys: |
${{ runner.os }}-build-cache-uyuni-obs-to-maven-
- name: Cache-nodejs
uses: actions/cache@v4
with:
path: web/html/src/node_modules
key: ${{ runner.os }}-build-cache-uyuni-nodejs-${{ hashFiles('**/web/html/src/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-cache-uyuni-nodejs-
- name: create_tmp
run: ./testsuite/podman_runner/01_setup_tmp_dirs.sh
- name: create-podman-network
run: ./testsuite/podman_runner/02_setup_network.sh
- name: start_controller_and_registry_and_buildhost
run: ./testsuite/podman_runner/03_run_controller_and_registry_and_buildhost.sh
- name: create_ssh_conf
run: ./testsuite/podman_runner/04_setup_ssh_controller.sh
- name: install_gems_in_controller
run: ./testsuite/podman_runner/05_install_gems_in_controller.sh
- name: collect_and_tag_flaky_tests_in_controller
# Until we refactor the usage of the secret, it only runs on uyuni-project/uyuni repository branches
if: github.repository == 'uyuni-project/uyuni'
run: ./testsuite/podman_runner/06_collect_and_tag_flaky_tests_in_controller.sh
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_GALAXY_CI }}
- name: start-server-container
run: ./testsuite/podman_runner/07_start_server.sh
- name: mgr-setup
run: ./testsuite/podman_runner/08_manager_setup.sh
- name: build_code
run: ./testsuite/podman_runner/09_build_server_code.sh
# - name: copy_ca
# run: podman exec server bash -c "cp /etc/pki/tls/certs/spacewalk.crt /tmp"
# - name: update_ca_in_controller
# run: podman exec controller bash -c "cat /tmp/spacewalk.crt >> /etc/ssl/ca-bundle.pem"
- name: sle-sshminion
run: ./testsuite/podman_runner/10_run_sshminion.sh
- name: test_from_host
run: curl --insecure https://localhost:8443/rhn/help/Copyright.do
- name: test_from_container
run: sudo -i podman exec opensusessh curl --insecure https://server:443/rhn/help/Copyright.do
- name: setup_sshd
run: ./testsuite/podman_runner/11_setup_sshd.sh
- name: run_cucumber_core
run: ./testsuite/podman_runner/12_run_core_tests.sh
- name: sle-salt-minion
run: ./testsuite/podman_runner/13_run_salt_sle_minion.sh
- name: rhlike-minion
run: ./testsuite/podman_runner/14_run_salt_rhlike_minion.sh
- name: deblike-minion
run: ./testsuite/podman_runner/15_run_salt_deblike_minion.sh
- name: accept_keys
run: ./testsuite/podman_runner/16_accept_all_keys.sh
- name: run_cucumber_clients
run: ./testsuite/podman_runner/17_run_init_clients_tests.sh
- name: split_secondary
run: ./testsuite/podman_runner/19_split_secondary_p_tests.sh
- name: run_secondary_tests
run: ./testsuite/podman_runner/${{ inputs.secondary_tests }}
- name: get_server_logs
if: ${{ failure() }}
run: ./testsuite/podman_runner/20_get_server_logs.sh ${{ inputs.server_id }}
- name: get_client_logs
if: ${{ failure() }}
run: ./testsuite/podman_runner/21_get_client_logs.sh ${{ inputs.server_id }}
- name: upload_server_log_artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: server_rhn_logs_${{ inputs.server_id }}
path: /tmp/testing/server-logs/${{ inputs.server_id }}
- name: upload_client_log_artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: client_logs_${{ inputs.server_id }}
path: ./testsuite/logs