Skip to content

Commit f067f8a

Browse files
authored
Add Interstellar CI (#1604)
1 parent a64cc7b commit f067f8a

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/test-e2e.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,37 @@ jobs:
7676
permissions:
7777
contents: read
7878
secrets: inherit
79+
80+
detect-interstellar:
81+
runs-on: ubuntu-latest
82+
permissions:
83+
contents: read
84+
outputs:
85+
enabled: ${{ steps.check.outputs.enabled }}
86+
steps:
87+
- uses: actions/checkout@v4
88+
with:
89+
sparse-checkout: thor/fork_config.go
90+
sparse-checkout-cone-mode: false
91+
- name: Check for INTERSTELLAR fork definition
92+
id: check
93+
run: |
94+
# INTERSTELLAR is considered defined when the SoloFork block in
95+
# thor/fork_config.go contains an INTERSTELLAR field, regardless of value.
96+
# Its presence indicates the fork has been implemented and is ready for e2e testing.
97+
if awk '/var SoloFork/,/^}/' thor/fork_config.go | grep -q 'INTERSTELLAR'; then
98+
echo "enabled=true" >> "$GITHUB_OUTPUT"
99+
else
100+
echo "enabled=false" >> "$GITHUB_OUTPUT"
101+
fi
102+
103+
run-interstellar-tests:
104+
needs: detect-interstellar
105+
if: needs.detect-interstellar.outputs.enabled == 'true'
106+
uses: vechain/interstellar-e2e/.github/workflows/test.yml@main
107+
with:
108+
thor-branch: ${{ github.head_ref || github.ref_name }}
109+
thor-repo: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
110+
permissions:
111+
contents: read
112+
secrets: inherit

0 commit comments

Comments
 (0)