feat: add ARM64 runtime release configuration
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
test('release targets AMD64 and ARM64 with layout 7', () => {
|
||||
const release = JSON.parse(readFileSync(new URL('../release.json', import.meta.url), 'utf8'));
|
||||
assert.deepEqual(release.platforms, ['linux/amd64', 'linux/arm64']);
|
||||
assert.equal(release.deployment_schema, 7);
|
||||
});
|
||||
|
||||
test('Node and Caddy stages inherit the target platform', () => {
|
||||
const dockerfile = readFileSync(new URL('./Dockerfile', import.meta.url), 'utf8');
|
||||
const stages = dockerfile.split(String.fromCharCode(10)).filter(line => line.startsWith('FROM '));
|
||||
assert.deepEqual(stages, ['FROM caddy:2.10.2 AS proxy', 'FROM node:24-bookworm-slim']);
|
||||
assert.ok(dockerfile.includes('COPY --from=proxy /usr/bin/caddy /usr/bin/caddy'));
|
||||
});
|
||||
Reference in New Issue
Block a user