-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test enhancements): enhance (#241)
* feat(test enhancements): enhance * fix(report): report * fix(fix): failing test * fix(fix): test * fix(fix): issue * fix(fix): coverage threshold * fix(fix): number * fix(fix): last steps * fix(fix): sonarqube * fix(rem test.ts from calc): calc * fix(rem): test
- Loading branch information
Showing
12 changed files
with
11,520 additions
and
11,886 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
41 changes: 29 additions & 12 deletions
41
.github/workflows/test-nibijs.yaml → .github/workflows/test-ts-sdk.yaml
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,49 +1,66 @@ | ||
name: ⛓️ Tests @nibiruchain/nibijs | ||
name: ⛓️ Tests @nibiruchain/ts-sdk | ||
|
||
on: | ||
pull_request: | ||
branches: ["main", "releases/*"] | ||
branches: ["releases/*"] | ||
paths: ["**.js", "**.ts", "**.tsx", "**.json"] | ||
push: | ||
branches: ["main", "releases/*"] | ||
branches: ["releases/*"] | ||
paths: ["**.js", "**.ts", "**.tsx", "**.json"] | ||
|
||
jobs: | ||
test-nibijs: | ||
runs-on: ubuntu-latest | ||
env: | ||
CHAIN_HOST: ${{ secrets.CHAIN_HOST }} | ||
VALIDATOR_MNEMONIC: ${{ secrets.VALIDATOR_MNEMONIC }} | ||
VALIDATOR_ADDRESS: ${{ secrets.VALIDATOR_ADDRESS }} | ||
LCD_ENDPOINT: "http://127.0.0.1:1317" | ||
GRPC_ENDPOINT: "127.0.0.1:9090" | ||
TENDERMINT_RPC_ENDPOINT: "http://127.0.0.1:26657" | ||
USE_LOCALNET: true | ||
WEBSOCKET_ENDPOINT: "ws://127.0.0.1:26657/websocket" | ||
CHAIN_ID: "nibiru-localnet-0" | ||
VALIDATOR_MNEMONIC: "guard cream sadness conduct invite crumble clock pudding hole grit liar hotel maid produce squeeze return argue turtle know drive eight casino maze host" | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Install nibid | ||
run: curl -s https://get.nibiru.fi/@v0.21.9! | bash | ||
# Use https://get.nibiru.fi/ to get the most recent release. | ||
|
||
- name: Check nibid version | ||
run: nibid version | ||
|
||
- name: Run localnet.sh in the background | ||
run: | | ||
sh scripts/localnet.sh & | ||
- name: Setup NodeJS and npm | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/hydrogen" | ||
- name: Install yarn using npm | ||
run: npm install -g yarn | ||
- name: Setup NodeJS with yarn caching | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/hydrogen" | ||
cache: "yarn" | ||
|
||
- name: Install yarn using npm | ||
run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: yarn --prefer-offline --check-files | ||
|
||
- name: Build the application | ||
run: yarn build --include-dependencies || yarn build --parallel --include-dependencies | ||
- name: Run tests - nibijs | ||
run: yarn test:nibijs | ||
|
||
- name: Run tests | ||
run: yarn test | ||
|
||
- name: Jest Coverage Comment | ||
uses: MishaKav/jest-coverage-comment@main | ||
|
||
- 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 }} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
sonar.projectKey=NibiruChain_ts-sdk | ||
sonar.organization=nibiruchain | ||
|
||
sonar.javascript.lcov.reportPaths=./coverage/lcov.info | ||
sonar.coverage.exclusions=**/*.test.ts | ||
|
||
# This is the name and version displayed in the SonarCloud UI. | ||
#sonar.projectName=ts-sdk | ||
#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 |
Oops, something went wrong.
f9e55f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.