-
Notifications
You must be signed in to change notification settings - Fork 43
111 lines (93 loc) · 2.96 KB
/
ci-service.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
name: CI - Service
on:
push:
paths:
# NOTE: GitHub Actions do not allow using YAML references, the same path
# list is used below for the pull request event. Keep both lists in sync!!
# this file as well
- .github/workflows/ci-service.yml
# any change in the service subfolder
- service/**
# except Markdown documentation
- "!service/**.md"
# except the packaging
- "!service/package/**"
# except the DBus configuration
- "!service/share/**"
pull_request:
paths:
# NOTE: GitHub Actions do not allow using YAML references, the same path
# list is used above for the push event. Keep both lists in sync!!
# this file as well
- .github/workflows/ci-service.yml
# any change in the service subfolder
- service/**
# except Markdown documentation
- "!service/**.md"
# except the packaging
- "!service/package/**"
# except the DBus configuration
- "!service/share/**"
# allow running manually
workflow_dispatch:
jobs:
ruby_tests:
runs-on: ubuntu-latest
env:
COVERAGE: 1
defaults:
run:
working-directory: ./service
strategy:
fail-fast: false
matrix:
distro: [ "tumbleweed" ]
container:
image: registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Configure and refresh repositories
# disable unused repositories to have faster refresh
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref
- name: Install Ruby development files
run: zypper --non-interactive install
gcc
gcc-c++
make
openssl-devel
ruby-devel
augeas-devel
- name: Install required packages
run: zypper --non-interactive install
suseconnect-ruby-bindings
autoyast2-installation
yast2
yast2-bootloader
yast2-country
yast2-hardware-detection
yast2-installation
yast2-iscsi-client
yast2-network
yast2-proxy
yast2-storage-ng
yast2-users
- name: Install RubyGems dependencies
run: bundle config set --local with 'development' && bundle install
- name: Run the tests and generate coverage report
run: bundle exec rspec
# send the code coverage for the Ruby part to the coveralls.io
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
base-path: ./service
flag-name: service
parallel: true
# close the code coverage and inherit the previous coverage for the Web and
# Rust parts (it needs a separate step, the "carryforward" flag can be used
# only with the "parallel-finished: true" option)
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "rust,web"