Skip to content

Commit c950521

Browse files
committed
ruby UT example
1 parent 7a8ba8d commit c950521

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

.github/workflows/sonarqube-internal-repo.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,38 @@ jobs:
9999
GOPRIVATE: ${{ inputs.go-private-modules }} # github.com/progress-platform-services/*
100100
run: git config --global url."https://${{ secrets.GH_TOKEN }}@github.com/".insteadOf "https://github.com/"
101101

102+
#TODO: language specific unit tests (also needs paramterization)
103+
# GoLang Unit tests
102104
- name: Generate unit test coverage files
103105
if: ${{ inputs.perform-build == true && inputs.report-unit-test-coverage == true && inputs.language == 'Go' && inputs.visibility == 'internal'}}
104106
run: |
105107
go test -v -coverprofile="coverage.out" ./...
106108
mkdir -p test/coverage
107-
cp coverage.out test/coverage/coverage.out
109+
cp coverage.out test/coverage/coverage.out
110+
# Ruby Unit tests
111+
- name: Generate unit test coverage files
112+
if: ${{ inputs.perform-build == true && inputs.report-unit-test-coverage == true && inputs.language == 'Ruby' && inputs.visibility == 'internal'}}
113+
run: |
114+
mkdir -p test/coverage
115+
cp coverage/.resultset.json test/coverage/.resultset.json
116+
coverage-test:
117+
# name: Coverage from chef-vault
118+
# runs-on: ubuntu-22.04
119+
# steps:
120+
# - uses: actions/checkout@v2
121+
# - name: Set up ruby 3.1
122+
# uses: ruby/setup-ruby@v1
123+
# with:
124+
# ruby-version: 3.1
125+
# bundler-cache: true
126+
# - name: run specs
127+
# run: bundle exec rake spec --trace
128+
# - name: Simplecov Report
129+
# uses: aki77/simplecov-report-action@v1
130+
# with:
131+
# token: ${{ secrets.GITHUB_TOKEN }}
132+
# failedThreshold: 90
133+
# resultPath: coverage/.last_run.json
108134

109135
- name: SonarQube Scan
110136
if: ${{ inputs.perform-build == true && inputs.report-unit-test-coverage == true && inputs.visibility == 'internal' }}

.github/workflows/sonarqube-public-repo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
contents: read
8585

8686
steps:
87-
- name:
87+
- name: Checkout code
8888
if: ${{ inputs.visibility == 'public' }}
8989
uses: actions/checkout@v4
9090
with:

.github/workflows/stubs/ci-main-pull-request-stub.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
workflow_dispatch:
1717

1818
env:
19-
STUB_VERSION: "1.0.0" # TODO: update this to the version of the stub
19+
STUB_VERSION: "1.0.0"
2020

2121
jobs:
2222
echo_inputs:

0 commit comments

Comments
 (0)