Skip to content

ci: add GitHub Actions test workflow - #689

Merged
Randy808 merged 5 commits into
masterfrom
ci-github-actions
Oct 6, 2026
Merged

Randy808 merged 5 commits into
masterfrom
ci-github-actions

Conversation

@DeviaVir

@DeviaVir DeviaVir commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Replaces the old PR workflow with a self-contained GitHub Actions test workflow.

  • unit (Node 18.20.4, as in contrib/Dockerfile.base): npm install, npm test, and builds of bitcoin-mainnet and liquid-mainnet.
  • regtest (amd64 and arm64): build contrib/Dockerfile.base (using the public blockstream/esplora-base image as a build cache), start contrib/docker-compose.yml, and wait until /regtest/api/blocks/tip/height returns 100. Container logs are printed on failure.

The workflow runs on pull_request and pushes to master, with permissions: contents: read, persist-credentials: false and no secrets. Actions are pinned to commit SHAs.

@DeviaVir DeviaVir changed the title ci: test pull requests with GitHub Actions instead of GitLab runners ci: add GitHub Actions test workflow Oct 6, 2026
@DeviaVir
DeviaVir requested a balanced review from Copilot October 6, 2026 09:31
Replace the old pull request workflow with a self-contained GitHub Actions
test workflow:

- unit: npm install, npm test, and builds of bitcoin-mainnet and
  liquid-mainnet (Node 18.20.4, as in contrib/Dockerfile.base)
- regtest (amd64, arm64): build contrib/Dockerfile.base (public base image
  as build cache) and contrib/docker-compose.yml, then wait until the regtest
  API reports block height 100

Runs on pull_request and pushes to master with a read-only token and no
secrets.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The cross-architecture Docker workflow and pinned external actions require validation on GitHub-hosted runners.

Review effort: Balanced
Findings: None

What changed in this PR

Replaces GitLab-triggered PR testing with a secret-free GitHub Actions workflow.

Changes:

  • Adds unit tests and production builds on Node 18.20.4.
  • Adds native amd64/arm64 Docker regtest validation.
  • Removes the previous GitHub-to-GitLab test bridge.
File Description
.github/​workflows/​test.yml Adds the GitHub Actions test workflow.
.github/​workflows/​start-gitlab.yml Removes the GitLab trigger workflow.
gitlab/​test.yml Removes GitLab PR test and status-reporting jobs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@DeviaVir
DeviaVir marked this pull request as ready for review October 6, 2026 09:35
The static assets are not content-hashed (app.js, style.css, ...), so any
cache in front of the explorer has to choose between long TTLs (deploys
take hours to show up, and new HTML can load old JS/CSS) and frequent
revalidation.

The build now writes content-hashed copies (sha256, 12 hex) of app.js,
style.css, style-rtl.css, instascan.min.js, js/infinite-scroll.js and the
fonts referenced from the CSS, keeps the original files, and writes
asset-manifest.json. index.html, notfound.html and the prerender server
reference the hashed names, so deployments can serve hashed files with
`Cache-Control: public, max-age=31536000, immutable` and keep only the HTML
short-lived. The stylesheet link carries data-ltr/data-rtl so the Hebrew
switch picks the hashed RTL file (HTML cached before this change still
works). Fonts are rewritten inside the CSS before the CSS is hashed.
HASH_ASSETS=0 restores the old names (no manifest, no copies).

Also fixes two absolute paths that broke when the explorer is served under
a prefix: lander.js loaded `${staticRoot}/js/infinite-scroll.js` (double
slash) and style.css used url('/img/icons/arrow-right-orange.svg').
The Docker image builds each flavor into /srv/explorer/static/<flavor>, so the
default manifest path (dist/asset-manifest.json) did not exist for the bundled
prerender service and /nojs/ pages kept the unhashed asset names.
The prerender bundle is compiled before the static builds, so envify cannot
bake the hashed infinite-scroll name into it, and lander.js read the env var
once at module load. The prerender server now loads the flavor's manifest
once at startup and exports the lazy-script names (exportAssetEnv), and
lander.js reads the name at render time. The browser bundle is unchanged:
envify still inlines the literal.
@Randy808
Randy808 merged commit 0c3dd58 into master Oct 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants