-
Notifications
You must be signed in to change notification settings - Fork 43
169 lines (124 loc) · 4.02 KB
/
ci.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: CI
on: [push, pull_request]
jobs:
frontend_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
strategy:
matrix:
node-version: ["18.x"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- name: Install dependencies
run: npm install
- name: Build the application
run: make
- name: Run check spell
run: npm run cspell
- name: Check types
run: npm run check-types
- name: Run ESLint
run: npm run eslint
- name: Run Stylelint
run: npm run stylelint
- name: Run the tests and generate coverage report
run: npm test -- --coverage
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
base-path: ./web
flag-name: frontend
parallel: true
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@v3
- 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 || zypper ref || zypper ref )
- name: Install Ruby development files
run: zypper --non-interactive install gcc gcc-c++ make openssl-devel ruby-devel npm augeas-devel
- name: Install required packages
run: zypper --non-interactive install yast2-iscsi-client
- 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
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
base-path: ./service
flag-name: backend
parallel: true
rust_ci:
runs-on: ubuntu-latest
env:
COVERAGE: 1
defaults:
run:
working-directory: ./rust
strategy:
fail-fast: false
matrix:
distro: [ "tumbleweed" ]
container:
image: registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby
options: --security-opt seccomp=unconfined
steps:
- name: Git Checkout
uses: actions/checkout@v3
- 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 || zypper ref || zypper ref )
- name: Install Rust development files
run: zypper --non-interactive install rustup
- name: Install required packages
run: zypper --non-interactive install python-langtable-data openssl-3 libopenssl-3-devel jq
- name: Install Rust toolchains
run: rustup toolchain install stable
- name: Install cargo-binstall
uses: taiki-e/install-action@v2
with:
tool: cargo-binstall
- name: Install Tarpaulin (for code coverage)
run: cargo-binstall --no-confirm cargo-tarpaulin
- name: Run the tests
run: cargo tarpaulin --out xml
- name: Lint formatting
run: cargo fmt --all -- --check
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
base-path: ./rust
format: cobertura
flag-name: rust-backend
parallel: true
finish:
runs-on: ubuntu-latest
needs: [frontend_build, ruby_tests, rust_ci]
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1
with:
parallel-finished: true