Skip to content

Commit

Permalink
feat(ci): only on push
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajpiar committed Jun 12, 2024
1 parent b636b88 commit 192a419
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- '**'
- "**"

jobs:
prepare-rskj:
Expand Down Expand Up @@ -90,16 +90,15 @@ jobs:
- name: If GH event is PR
if: github.event_name == 'pull_request'
run: |
git branch -f master origin/master
pr_number==${{ github.event.pull_request.number }}
extra_flags="-Dsonar.pullrequest.base=master
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.key=$pr_number"
pr_number=${{ github.event.pull_request.number }}
extra_flags="-Dsonar.pullrequest.base=${{ github.base_ref }} \
-Dsonar.pullrequest.branch=${{ github.head_ref }} \
-Dsonar.pullrequest.key=$pr_number"
./gradlew sonarqube --no-daemon -x build -x test \
$extra_flags \
-Dsonar.organization=rsksmart \
-Dsonar.host.url="https://sonarcloud.io" \
-Dsonar.token="${{ secrets.SONAR_TOKEN }}"
$extra_flags \
-Dsonar.organization=rsksmart \
-Dsonar.host.url="https://sonarcloud.io" \
-Dsonar.token="${{ secrets.SONAR_TOKEN }}"
- name: If not
if: github.event_name != 'pull_request'
Expand Down Expand Up @@ -225,7 +224,7 @@ jobs:
- name: Change mining-integration-tests bitcoind url in config.json to localhost
working-directory: mining-integration-tests
run: |
jq '.bitcoind.url = "localhost"' config.json > config.json.tmp && mv config.json.tmp config.json
jq 'if .bitcoind.url? then .bitcoind.url = "localhost" else error(".bitcoind.url not found") end' config.json > config.json.tmp && mv config.json.tmp config.json
- name: Generate BTC blocks
working-directory: mining-integration-tests
Expand Down
2 changes: 2 additions & 0 deletions DELME
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
poop
poop

0 comments on commit 192a419

Please sign in to comment.