-
Notifications
You must be signed in to change notification settings - Fork 359
86 lines (72 loc) · 2.61 KB
/
tests.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
# ======================================
# WARNING!
# THIS FILE IS GENERATED FROM A TEMPLATE
# DO NOT EDIT THIS FILE MANUALLY!
# ======================================
# The template is located in: tests.yml.j2
name: Run validation tests
on: pull_request
permissions:
contents: read
jobs:
unit-tests:
runs-on: [self-hosted, kstest]
timeout-minutes: 30
env:
CI_TAG: 'rhel-9'
TARGET_BRANCH_NAME: 'origin/rhel-9'
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
# otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger)
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Rebase to current ${{ env.TARGET_BRANCH_NAME }}
run: |
git config user.name github-actions
git config user.email [email protected]
git log --oneline -1 ${{ env.TARGET_BRANCH_NAME }}
git rebase ${{ env.TARGET_BRANCH_NAME }}
# build container if files for dockerfile changed in the PR
- name: Build anaconda-ci container
run: make -f Makefile.am anaconda-ci-build
- name: Run tests in anaconda-ci container
run: |
# put the log in the output, where it's easy to read and link to
make -f Makefile.am container-ci || { cat test-logs/test-suite.log; exit 1; }
- name: Upload test and coverage logs
if: always()
uses: actions/upload-artifact@v2
with:
name: 'logs (rhel-9)'
path: test-logs/*
rpm-tests:
runs-on: [self-hosted, kstest]
timeout-minutes: 30
env:
CI_TAG: 'rhel-9'
TARGET_BRANCH_NAME: 'origin/rhel-9'
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
# otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger)
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Rebase to current ${{ env.TARGET_BRANCH_NAME }}
run: |
git config user.name github-actions
git config user.email [email protected]
git log --oneline -1 ${{ env.TARGET_BRANCH_NAME }}
git rebase ${{ env.TARGET_BRANCH_NAME }}
- name: Build RPM test container
run: make -f Makefile.am anaconda-rpm-build
- name: Run RPM tests in container
run: make -f Makefile.am container-rpm-test
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v2
with:
name: 'logs-rpm-test (rhel-9)'
path: test-logs/*