forked from openSUSE/openSUSE-release-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (89 loc) · 3.49 KB
/
ci-test.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
name: Checks
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
timeout-minutes: 40
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ci_node_index: [Long1,Long2,Rest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup path
run: sed -i -e "s,../..:,$PWD:," dist/ci/docker-compose.yml
- name: install docker-compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Run tests
run: docker-compose -f dist/ci/docker-compose.yml run test
env:
# Specifies how many jobs you would like to run in parallel,
# used for partitioning
CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
# Use the index from matrix as an environment variable
CI_NODE_INDEX: ${{ matrix.ci_node_index }}
- name: Stop containers
if: always()
run: docker-compose -f dist/ci/docker-compose.yml down
smoke-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- registry.opensuse.org/opensuse/tumbleweed:latest
- registry.opensuse.org/opensuse/leap:15.6
container: ${{ matrix.image }}
steps:
- name: install git to checkout the repo
run: zypper -n in git
- uses: actions/checkout@v3
- name: fix the file permissions of the repository
run: chown -R $(id -un):$(id -gn) .
- name: add the openSUSE:Tools repository for Tumbleweed
if: ${{ contains(matrix.image, 'tumbleweed') }}
run: zypper -n ar https://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Tumbleweed/openSUSE:Tools.repo
- name: add the openSUSE:Tools repository for Leap
if: ${{ contains(matrix.image, '15.6') }}
run: zypper -n ar https://download.opensuse.org/repositories/openSUSE:/Tools/15.6/openSUSE:Tools.repo
- name: install the build & runtime dependencies of openSUSE-release-tool
run: |
zypper -n --gpg-auto-import-keys refresh
zypper -n source-install openSUSE-release-tools
zypper -n install openSUSE-release-tools
- name: FIXME, install missing dependencies
run: |
zypper -n in python3-typing_extensions python3-solv python3-pika python3-openqa_client build python3-influxdb python3-bugzilla
- name: run a simple smoke test whether --help actually works
run: |
for f in $(find . -maxdepth 1 -type f -executable -print); do
# skip completely broken scripts or those without --help
[[ " ./checknewer.py ./repo2fileprovides.py ./openqa-maintenance.py ./docker_publisher.py ./publish_distro ./findfileconflicts ./write_repo_susetags_file.pl ./issue-diff.py ./generate-release-packages ./verify-build-and-generatelists ./slfo-packagelist-uploader.py" =~ "$f" ]] || "$f" --help
done
linters:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: install docker-compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Validate gocd config
run: cd gocd && sh generate.sh && git diff --exit-code
- name: Setup path
run: sed -i -e "s,../..:,$PWD:," dist/ci/docker-compose.yml
- name: Run Flaker
run: docker-compose -f dist/ci/docker-compose.yml run flaker
- name: Stop containers
if: always()
run: docker-compose -f dist/ci/docker-compose.yml down