-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add GHA to invoke RPC integration tests on commits to master #5161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Shaptic
wants to merge
3
commits into
stellar:master
Choose a base branch
from
Shaptic:rpc-test-invoke
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+75
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,55 @@ | ||
| name: 'Setup the Go environment' | ||
| description: 'Installs go and restores/saves the build/module cache' | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: '1.25' | ||
| # unfortunately we cannot use the provided caching because it uses the | ||
| # same cache for all workflows/jobs, leading to undesired cache clashes, | ||
| # causing uncached test runs etc ... | ||
| # You can see the cache key at https://github.com/actions/setup-go/blob/4e0b6c77c6448caafaff5eed51516cad78e7639a/src/cache-restore.ts#L34 | ||
| # There is a ticket to add prefixes for the cache, which should solve it https://github.com/actions/setup-go/issues/358 | ||
| cache: false | ||
|
|
||
| # Restore original modification time of files based on the date of the most | ||
| # recent commit that modified them as mtimes affect the Go test cache. | ||
| # See https://github.com/golang/go/issues/58571 for details | ||
| - name: Restore modification time of checkout files | ||
| uses: chetan/git-restore-mtime-action@075f9bc9d159805603419d50f794bd9f33252ebe | ||
|
|
||
|
|
||
| # KEY_PREFIX must uniquely identify the specific instance of a job executing. | ||
| - shell: bash | ||
| run: | | ||
| echo 'KEY_PREFIX=${{ github.workflow }}-${{ github.job }}-${{ runner.os }}-${{ inputs.go-version }}-matrix(${{ join(matrix.*,'|') }})' >> $GITHUB_OUTPUT | ||
| echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_OUTPUT | ||
| echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT | ||
| if [ ${{ runner.os }} != 'Windows' ]; then echo SUDO='sudo' >> $GITHUB_OUTPUT; fi | ||
| id: variables | ||
|
|
||
| # Cache the Go Modules downloaded during the job. | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ steps.variables.outputs.GOMODCACHE }} | ||
| key: ${{ steps.variables.outputs.KEY_PREFIX }}-go-mod-${{ hashFiles('**/go.sum') }} | ||
| restore-keys: ${{ steps.variables.outputs.KEY_PREFIX }}-go-mod- | ||
|
|
||
| # Cache any build and test artifacts during the job, which will speed up | ||
| # rebuilds and cause test runs to skip tests that have no reason to rerun. | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ steps.variables.outputs.GOCACHE }} | ||
| key: ${{ steps.variables.outputs.KEY_PREFIX }}-go-build-${{ github.ref }}-${{ hashFiles('**', '!.git') }} | ||
| restore-keys: | | ||
| ${{ steps.variables.outputs.KEY_PREFIX }}-go-build-${{ github.ref }}- | ||
| ${{ steps.variables.outputs.KEY_PREFIX }}-go-build- | ||
|
|
||
| # Reset the cache for master/protected branches, to ensure they build and run the tests from zero | ||
| # and that the module cache is cleaned (otherwise it accumulates orphan dependencies over time). | ||
| - if: github.ref_protected | ||
| shell: bash | ||
| run: ${{ steps.variables.outputs.SUDO }} rm -rf ${{ steps.variables.outputs.GOMODCACHE }} ${{ steps.variables.outputs.GOCACHE }} | ||
|
|
This file contains hidden or 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,20 @@ | ||
| name: RPC Integration Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| rpc: | ||
| name: RPC integration tests | ||
| uses: stellar/stellar-rpc/.github/workflows/integration-tests.yml@fix-callable-tests | ||
| with: | ||
| rpc_git_ref: protocol-next | ||
| core_git_ref: ${{ github.sha }} | ||
| protocol_version: '25' | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.