Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0883f60
add continue-on-error flag to test configuration
leighmcculloch Oct 12, 2025
c1d7005
add pull_request event to nightly-next image temporarily
leighmcculloch Oct 12, 2025
6786acf
add default false to continue-on-error config
leighmcculloch Oct 12, 2025
2f2a94e
remove quotes from continue-on-error default value
leighmcculloch Oct 12, 2025
f9440e4
nest tag under image key in test objects
leighmcculloch Oct 12, 2025
0a0a3a6
pass full image object to additional tests
leighmcculloch Oct 12, 2025
94b2bd7
move test timeouts from Go code to workflow
leighmcculloch Oct 12, 2025
ea9cf29
add continue-on-error flag to test job name
leighmcculloch Oct 12, 2025
92fb28f
remove pull_request event from nightly-next
leighmcculloch Oct 12, 2025
74cb904
make test timeouts dynamic based on run number
leighmcculloch Oct 12, 2025
2e13a85
extract timeout calculation to reusable step
leighmcculloch Oct 12, 2025
57e579d
push before test in local ci
leighmcculloch Oct 12, 2025
101382d
run tests in parallel with push instead of after
leighmcculloch Oct 12, 2025
5d14727
remove build dependency from test job
leighmcculloch Oct 12, 2025
2cea7e7
add test job to complete job dependencies
leighmcculloch Oct 12, 2025
4fee3ed
add images env var to additional tests step
leighmcculloch Oct 12, 2025
ba49893
use setup outputs instead of workflow inputs for test
leighmcculloch Oct 12, 2025
ec0e5c1
use run_attempt and parse timeout as JSON
leighmcculloch Oct 12, 2025
7a82f07
Merge branch 'add-continue-on-error-test-config' into push-before-test
leighmcculloch Oct 12, 2025
2d9c5e4
add fallback for continue-on-error display value
leighmcculloch Oct 12, 2025
7f44fe8
Merge branch 'add-continue-on-error-test-config' into push-before-test
leighmcculloch Oct 12, 2025
56c23f5
remove artifact retention days for logs env var
leighmcculloch Oct 13, 2025
c1e0c96
Merge branch 'main' into push-before-test
leighmcculloch Oct 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 8 additions & 129 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ on:

env:
artifact_retention_days_for_image: 7
artifact_retention_days_for_logs: 60

jobs:

Expand Down Expand Up @@ -94,12 +93,6 @@ jobs:
deps="$(<<< $images ./.scripts/images-deps)"
<<< $deps jq
echo "deps=$deps" >> $GITHUB_OUTPUT
- name: Additional Tests
id: tests
run: |
tests="$(<<< $images ./.scripts/images-additional-tests)"
<<< $tests jq
echo "additional-tests=$tests" >> $GITHUB_OUTPUT

load:
needs: [setup]
Expand Down Expand Up @@ -312,126 +305,12 @@ jobs:
retention-days: ${{ env.artifact_retention_days_for_image }}

test:
if: inputs.test
name: 6 test
needs: [setup, build]
if: always() && !failure() && !cancelled() && (github.event_name != 'workflow_call' || inputs.test == true)
strategy:
matrix:
image: ${{ fromJSON(needs.setup.outputs.images) }}
arch: ${{ fromJSON(inputs.archs) }}
network: ["local"]
enable: ["core","rpc","core,rpc,horizon"]
options: [""]
include: ${{ fromJSON(needs.setup.outputs.additional-tests) }}
fail-fast: false
name: 6 test (${{ matrix.image.tag }}, ${{ matrix.arch }}, ${{ matrix.network }}, ${{ matrix.enable }} ${{ matrix.options || '' }}, ${{ matrix.image.tests.continue-on-error && 'continue-on-error' || ''}})
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
continue-on-error: ${{ matrix.image.tests.continue-on-error || false }}
steps:
- name: Free up disk space
if: matrix.network == 'pubnet'
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
df -h
- uses: actions/checkout@v2
with:
repository: ${{ inputs.repo }}
ref: ${{ needs.setup.outputs.sha }}
- name: Download Quickstart Image
uses: actions/download-artifact@v4
with:
name: image-quickstart-${{ matrix.image.tag }}-${{ matrix.arch }}.tar
path: /tmp/
- name: Load Quickstart Image
run: docker load -i /tmp/image
- name: Prepare Logs Directory
run: mkdir -p logs
- name: Run Quickstart Image
run: >
docker run
--platform linux/${{ matrix.arch }}
-d
-p
"8000:8000"
-p "11626:11626"
--name stellar
quickstart:${{ matrix.image.tag }}-${{ matrix.arch }}
--${{ matrix.network }}
--enable ${{ matrix.enable }}
${{ matrix.options }}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1
- name: Sleep until supervisor is up
run: sleep 10
- name: Calculate timeout
id: timeout
run: echo "minutes=$((${{ github.run_attempt }} * 2))" >> $GITHUB_OUTPUT
- name: Run core test
if: ${{ contains(matrix.enable, 'core') }}
timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }}
run: |
docker logs stellar -f &
echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh &
go run tests/test_core.go
curl http://localhost:11626/info
- name: Run horizon up test
if: ${{ contains(matrix.enable, 'horizon') }}
timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }}
run: |
docker logs stellar -f &
echo "supervisorctl tail -f horizon" | docker exec -i stellar sh &
go run tests/test_horizon_up.go
curl http://localhost:8000
- name: Run horizon core up test
if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }}
timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }}
run: |
docker logs stellar -f &
echo "supervisorctl tail -f horizon" | docker exec -i stellar sh &
go run tests/test_horizon_core_up.go
curl http://localhost:8000
- name: Run horizon ingesting test
if: ${{ contains(matrix.enable, 'horizon') && matrix.network != 'pubnet' }}
timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }}
run: |
docker logs stellar -f &
echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh &
echo "supervisorctl tail -f horizon" | docker exec -i stellar sh &
go run tests/test_horizon_ingesting.go
curl http://localhost:8000
- name: Run friendbot test
if: ${{ contains(matrix.enable, 'horizon') && matrix.network == 'local' }}
timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }}
run: |
docker logs stellar -f &
echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh &
echo "supervisorctl tail -f horizon" | docker exec -i stellar sh &
go run tests/test_friendbot.go
- name: Run stellar rpc up test
if: ${{ contains(matrix.enable, 'rpc') }}
timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }}
run: |
docker logs stellar -f &
echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh &
go run tests/test_stellar_rpc_up.go
- name: Run stellar rpc healthy test
if: ${{ contains(matrix.enable, 'rpc') && matrix.network != 'pubnet' }}
timeout-minutes: ${{ fromJSON(steps.timeout.outputs.minutes) }}
run: |
docker logs stellar -f &
echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh &
go run tests/test_stellar_rpc_healthy.go
- name: Prepare Test Logs
if: always()
run: docker cp stellar:/var/log logs
- name: Upload Test Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.image.tag }}-${{ matrix.arch }}-test-${{ strategy.job-index }}
path: logs
retention-days: ${{ env.artifact_retention_days_for_logs }}
uses: ./.github/workflows/test.yml
with:
repo: ${{ inputs.repo }}
ref: ${{ needs.setup.outputs.sha }}
images: ${{ inputs.images }}
archs: ${{ inputs.archs }}
27 changes: 21 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
complete:
if: always()
name: complete
needs: [build, action-using-artifact, push, action-using-registry]
needs: [build, test, action-using-artifact, push, action-using-registry]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
Expand All @@ -44,6 +44,7 @@ jobs:
name: 1 setup
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.sha.outputs.sha }}
tag-prefix: ${{ steps.tag-prefix.outputs.tag-prefix }}
tag-alias-prefix: ${{ steps.tag-prefix.outputs.tag-alias-prefix }}
images: ${{ steps.images.outputs.images }}
Expand All @@ -54,6 +55,10 @@ jobs:
with:
fetch-depth: 0 # Get all history for the sha count below.
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Sha
id: sha
run: |
echo "sha=$(git rev-parse HEAD)" | tee -a $GITHUB_OUTPUT
- name: Tag Prefix
id: tag-prefix
run: |
Expand Down Expand Up @@ -88,24 +93,34 @@ jobs:
needs: setup
uses: ./.github/workflows/build.yml
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
ref: ${{ needs.setup.outputs.sha }}
images: ${{ needs.setup.outputs.images }}
archs: ${{ needs.setup.outputs.archs }}
test: false # do not run tests as part of build, tests run in parallel with push

test:
name: 3 test
needs: [setup, build]
uses: ./.github/workflows/test.yml
with:
ref: ${{ needs.setup.outputs.sha }}
images: ${{ needs.setup.outputs.images }}
archs: ${{ needs.setup.outputs.archs }}

action-using-artifact:
needs: [setup, build]
name: 3 test action artifact
name: 4 test action artifact
uses: ./.github/workflows/action-test.yml
with:
artifact: image-quickstart-${{ fromJSON(needs.setup.outputs.tags)[0] }}-${{ fromJSON(needs.setup.outputs.archs)[0] }}.tar
tag: ${{ fromJSON(needs.setup.outputs.tags)[0] }}-${{ fromJSON(needs.setup.outputs.archs)[0] }}

push:
name: 4 push
name: 5 push
needs: [setup, build]
uses: ./.github/workflows/push.yml
with:
sha: ${{ github.event.pull_request.head.sha || github.sha }}
sha: ${{ needs.setup.outputs.sha }}
tags: ${{ needs.setup.outputs.tags }}
archs: ${{ needs.setup.outputs.archs }}
tag-prefix: ${{ needs.setup.outputs.tag-prefix }}
Expand All @@ -118,7 +133,7 @@ jobs:

action-using-registry:
needs: [setup, push]
name: 5 test action registry
name: 6 test action registry
uses: ./.github/workflows/action-test.yml
with:
tag: ${{ needs.setup.outputs.tag-prefix }}${{ fromJSON(needs.setup.outputs.tags)[0] }}
Loading