Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 09d3261

Browse files
committed
Fixing build numbers and sonar analysis configuration.
1 parent 4921610 commit 09d3261

4 files changed

Lines changed: 24 additions & 10 deletions

File tree

.github/workflows/build.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ env:
2323
# Environment for building a release
2424
CURRENT_BRANCH: ${TRAVIS_BRANCH}
2525
UTPLSQL_REPO: "utPLSQL/utPLSQL"
26-
UTPLSQL_BUILD_NO: ${{github.run_id}}
26+
UTPLSQL_BUILD_NO_OFFSET: 3563
27+
UTPLSQL_BUILD_NO: $( expr ${{github.run_number}} + ${UTPLSQL_BUILD_NO_OFFSET} )
2728
UTPLSQL_VERSION: $(. .travis/get_project_version.sh)
2829
UTPLSQL_BUILD_VERSION: $(. .travis/get_project_build_version.sh)
2930
UTPLSQL_SOURCES_DIR: 'source'
@@ -104,6 +105,17 @@ jobs:
104105
with:
105106
fetch-depth: 0
106107

108+
- name: Set build no
109+
run: echo "UTPLSQL_BUILD_NO=$( expr ${{github.run_number}} + ${UTPLSQL_BUILD_NO_OFFSET} )" >> $GITHUB_ENV
110+
111+
- name: Set version
112+
run: echo "UTPLSQL_VERSION=$(. .travis/get_project_version.sh)" >> $GITHUB_ENV
113+
114+
- name: Set version build no
115+
116+
run: echo "UTPLSQL_BUILD_VERSION=$(. .travis/get_project_build_version.sh)" >> $GITHUB_ENV
117+
- name: Output Run numbers
118+
run: echo github.run_id is ${{ github.run_id }} github.run_number is ${{ github.run_number }} UTPLSQL_BUILD_NO is $UTPLSQL_BUILD_NO UTPLSQL_VERSION is $UTPLSQL_VERSION UTPLSQL_BUILD_VERSION is $UTPLSQL_BUILD_VERSION
107119
# - name: Update project version & build number
108120
# run: sh ${{ github.workspace }}/.travis/update_project_version.sh
109121

@@ -134,10 +146,11 @@ jobs:
134146
- name: Run Tests
135147
run: bash $(pwd)/test/run_tests.sh
136148

149+
- name: Validate utPLSQL reports format
150+
run: bash .travis/validate_report_files.sh
137151

138-
#
139-
# - name: SonarCloud Scan
140-
# uses: SonarSource/sonarcloud-github-action@master
141-
# env:
142-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
143-
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
152+
- name: SonarCloud Scan
153+
uses: SonarSource/sonarcloud-github-action@master
154+
env:
155+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
156+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.travis/coveralls_uploader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fs.readFile('../coverage.json',function (err,data) {
1515
}
1616
req = JSON.parse(data);
1717
req.service_job_id = process.env.JOB_ID;
18-
req.service_name = 'travis-ci';
18+
req.service_name = 'github-actions';
1919
if (process.env.COVERALLS_REPO_TOKEN) {
2020
req.repo_token = process.env.COVERALLS_REPO_TOKEN;
2121
}

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
[![twitter](https://img.shields.io/twitter/follow/utPLSQL.svg?style=social&label=Follow)](https://twitter.com/utPLSQL)
1010

1111
[![build](https://travis-ci.com/utPLSQL/utPLSQL.svg?branch=develop)](https://travis-ci.com/utPLSQL/utPLSQL)
12-
[![sonar](https://sonarcloud.io/api/project_badges/measure?project=utPLSQL&metric=sqale_rating)](https://sonarcloud.io/dashboard/index?id=utPLSQL)
13-
[![Coveralls coverage](https://coveralls.io/repos/github/utPLSQL/utPLSQL/badge.svg?branch=develop)](https://coveralls.io/github/utPLSQL/utPLSQL?branch=develop)
12+
[![QualityGate](https://sonarcloud.io/api/project_badges/measure?project=utPLSQL&metric=sqale_rating)](https://sonarcloud.io/dashboard/index?id=utPLSQL)
13+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=utPLSQL&metric=coverage)](https://sonarcloud.io/summary/new_code?id=utPLSQL)
1414

1515
----------
1616
utPLSQL version 3 is a complete rewrite of utPLSQL v2 from scratch.

sonar-project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# must be unique in a given SonarQube instance
2+
sonar.organization=utplsql
23
sonar.projectKey=utPLSQL
34
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
45
sonar.projectName=utPLSQL

0 commit comments

Comments
 (0)