-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (81 loc) · 2.65 KB
/
module.yml
File metadata and controls
81 lines (81 loc) · 2.65 KB
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
name: Check Module
on:
workflow_call:
inputs:
name:
required: true
type: string
timeout-minutes:
required: false
type: number
default: 30
secrets:
sonar-token:
required: true
env:
target: x-${{ inputs.name }}
path: x/${{ inputs.name }}
jobs:
go-lint:
name: go lint
runs-on: ubuntu-latest
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -D USE_DOCKER=ON -D UID=$(id -u) -D GID=$(id -g) -D FIX_IS_ERROR=ON
- name: Lint
run: cmake --build build --target go_lint_${{ env.target }}
go-build:
name: go build
runs-on: ubuntu-latest
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -D USE_DOCKER=ON -D UID=$(id -u) -D GID=$(id -g) -D FIX_IS_ERROR=ON
- name: Build
run: cmake --build build --target go_build_${{ env.target }}
go-test:
name: go test
runs-on: ubuntu-latest
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Configure
run: cmake -S . -B build -D USE_DOCKER=ON -D UID=$(id -u) -D GID=$(id -g) -D FIX_IS_ERROR=ON
- name: Install builders
run: cmake --build build --target install_builders
- name: Test
run: |
VERBOSE=1 ctest --test-dir build --output-on-failure --stop-on-failure -R ${{ env.target }}
mv build/${{ env.path }}/docker/${{ env.path }}/cover.out ${{ env.path }}/
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.sonar-token }}
with:
projectBaseDir: ${{ env.path }}/
buf-format:
name: buf format
runs-on: ubuntu-latest
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -D USE_DOCKER=ON -D UID=$(id -u) -D GID=$(id -g) -D FIX_IS_ERROR=ON
- name: Lint
run: cmake --build build --target buf_format_${{ env.target }}
buf-lint:
name: buf lint
runs-on: ubuntu-latest
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -D USE_DOCKER=ON -D UID=$(id -u) -D GID=$(id -g) -D FIX_IS_ERROR=ON
- name: Lint
run: cmake --build build --target buf_lint_${{ env.target }}