-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
169 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Check Module | ||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
required: true | ||
type: string | ||
secrets: | ||
sonar-token: | ||
required: true | ||
env: | ||
id: x-${{ inputs.name }} | ||
path: x/${{ inputs.name }} | ||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure | ||
run: cmake -S . -B build | ||
- name: Build | ||
run: cmake --build build --target lint_${{ env.id }} | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure | ||
run: cmake -S . -B build | ||
- name: Build | ||
run: cmake --build build --target build_${{ env.id }} | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
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 | ||
- name: Test | ||
run: | | ||
VERBOSE=1 ctest --test-dir build --output-on-failure --stop-on-failure -R ${{ env.id }} | ||
mv build/${{ 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 }}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Check Modules | ||
on: | ||
pull_request: | ||
jobs: | ||
check-modules: | ||
name: check modules | ||
strategy: | ||
matrix: | ||
include: | ||
- name: test | ||
sonar-token: SONAR_TOKEN_X_TEST | ||
- name: escrow | ||
sonar-token: SONAR_TOKEN_X_ESCROW | ||
uses: ./.github/workflows/module.yml | ||
with: | ||
name: ${{ matrix.name }} | ||
secrets: | ||
sonar-token: ${{ secrets[matrix.sonar-token] }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
sonar.projectKey=0tech_andromeda | ||
sonar.organization=0tech | ||
|
||
# This is the name and version displayed in the SonarCloud UI. | ||
#sonar.projectName=0tech_andromeda | ||
#sonar.projectVersion=1.0 | ||
|
||
|
||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | ||
#sonar.sources=. | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
#sonar.sourceEncoding=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
sonar.projectKey=0tech_andromeda_x-escrow | ||
sonar.organization=0tech | ||
|
||
# This is the name and version displayed in the SonarCloud UI. | ||
sonar.projectName=andromeda - x/escrow | ||
#sonar.projectVersion=1.0 | ||
|
||
|
||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | ||
#sonar.sources=. | ||
sonar.inclusions=**/*.go | ||
sonar.exclusions=api/**,**/*.pb.go,**/*.pb.gw.go,**/*_test.go | ||
sonar.test.inclusions=**/*_test.go | ||
sonar.go.coverage.reportPaths=cover.out | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
#sonar.sourceEncoding=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
sonar.projectKey=0tech_andromeda_x-test | ||
sonar.organization=0tech | ||
|
||
# This is the name and version displayed in the SonarCloud UI. | ||
sonar.projectName=andromeda - x/test | ||
#sonar.projectVersion=1.0 | ||
|
||
|
||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | ||
#sonar.sources=. | ||
sonar.inclusions=**/*.go | ||
sonar.exclusions=api/**,**/*.pb.go,**/*.pb.gw.go,**/*_test.go | ||
sonar.test.inclusions=**/*_test.go | ||
sonar.go.coverage.reportPaths=cover.out | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
#sonar.sourceEncoding=UTF-8 |