-
Notifications
You must be signed in to change notification settings - Fork 31
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
14 changed files
with
126 additions
and
164 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,65 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
- cron: '0 0 * * 1' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
oscript_version: ['1.2.0', 'dev', 'stable'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Onescript Action | ||
uses: otymko/setup-onescript@v1.1 | ||
with: | ||
version: ${{ matrix.oscript_version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
opm install opm@1.0.2 | ||
opm install 1testrunner; | ||
opm install 1bdd; | ||
opm install coverage; | ||
opm install -l --dev | ||
- name: Compute branch name | ||
uses: nelonoel/branch-name@v1.0.1 | ||
|
||
- name: Run tests | ||
run: | | ||
oscript ./tasks/coverage.os | ||
- name: SonarCloud Scan on push | ||
if: github.repository == 'oscript-library/opm' && github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.oscript_version == 'dev' | ||
uses: nixel2007/sonarcloud-github-action@v1.4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
args: > | ||
-Dsonar.host.url=https://sonar.openbsl.ru | ||
-Dsonar.branch.name=${{ env.BRANCH_NAME }} | ||
- name: SonarCloud Scan on PR | ||
if: github.repository == 'oscript-library/opm' && github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.oscript_version == 'dev' | ||
uses: nixel2007/sonarcloud-github-action@v1.4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
args: > | ||
-Dsonar.host.url=https://sonar.openbsl.ru | ||
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} | ||
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} | ||
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
oscript_modules/* | ||
tests-reports/* | ||
coverage/* | ||
out/* | ||
bdd-*.xml | ||
*.ospx | ||
src/oscript.cfg | ||
|
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
# must be unique in a given SonarQube instance | ||
sonar.projectKey=opm | ||
|
||
# this is the name displayed in the SonarQube UI | ||
sonar.projectName=opm | ||
|
||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | ||
# Since SonarQube 4.2, this property is optional if sonar.modules is set. | ||
# If not set, SonarQube starts looking for source code from the directory containing | ||
# the sonar-project.properties file. | ||
|
||
sonar.sources=./src | ||
sonar.tests=./tests | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
sonar.sourceEncoding=UTF-8 | ||
|
||
sonar.coverageReportPaths=out/genericCoverage.xml | ||
sonar.testExecutionReportPaths=out/tests.xml |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.