Skip to content
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

chore: improve docker build DX #10

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ concurrency:
permissions:
contents: read

env:
BUILDKIT_PROGRESS: plain

jobs:
build:
name: Build
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
permissions:
contents: read

env:
BUILDKIT_PROGRESS: plain

jobs:
version:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions packages/solana-container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"license": "MPL-2.0",
"scripts": {
"build:docker": "docker buildx build -t ghcr.io/fuxingloh/solana-container:$(node -p \"require('./version.js')\") -f Dockerfile ../../ --build-arg SOLANA_VERSION=$(node -p \"require('./version.js')\") --cache-from type=registry,ref=ghcr.io/fuxingloh/solana-container:build-cache",
"push:docker": "docker buildx build -t ghcr.io/fuxingloh/solana-container:$(node -p \"require('./version.js')\") -f Dockerfile ../../ --output type=registry --platform linux/amd64,linux/arm64 --build-arg SOLANA_VERSION=$(node -p \"require('./version.js')\") --cache-to type=registry,ref=ghcr.io/fuxingloh/solana-container:build-cache,mode=max --cache-from type=registry,ref=ghcr.io/fuxingloh/solana-container:build-cache"
"build:docker": "docker buildx build --progress=plain -t ghcr.io/fuxingloh/solana-container:$(node -p \"require('./version.js')\") -f Dockerfile ../../ --build-arg SOLANA_VERSION=$(node -p \"require('./version.js')\") --cache-from type=registry,ref=ghcr.io/fuxingloh/solana-container:build-cache",
"push:docker": "docker buildx build --progress=plain -t ghcr.io/fuxingloh/solana-container:$(node -p \"require('./version.js')\") -f Dockerfile ../../ --output type=registry --platform linux/amd64,linux/arm64 --build-arg SOLANA_VERSION=$(node -p \"require('./version.js')\") --cache-to type=registry,ref=ghcr.io/fuxingloh/solana-container:build-cache,mode=max --cache-from type=registry,ref=ghcr.io/fuxingloh/solana-container:build-cache"
},
"lint-staged": {
"*": [
Expand Down
11 changes: 10 additions & 1 deletion packages/solana-testcontainers/index.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('SolanaContainer', () => {
beforeAll(async () => {
container = await new SolanaContainer().start();
connection = new Connection(container.getHostRpcEndpoint(), {
commitment: 'processed',
commitment: 'confirmed',
wsEndpoint: container.getHostWsEndpoint(),
});
});
Expand All @@ -28,6 +28,15 @@ describe('SolanaContainer', () => {
expect(blockHeight).toBeGreaterThanOrEqual(0);
});

it('should get block 0', async () => {
const block = await connection.getBlock(0);
expect(block).toMatchObject({
blockHeight: 0,
// Not deterministic
blockhash: expect.any(String),
});
});

it('should fund address with 5129000000 lamports with confirmation', async () => {
const publicKey = new PublicKey('Emp8JcXpFnCXzdWBC3ChRPtNQHiiQW6kr61wopT3hbNL');
const lamports = 5_129_000_000;
Expand Down