Skip to content

Commit

Permalink
chore: improve docker build DX (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored Mar 19, 2024
1 parent ffb7c94 commit a6c7e3e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
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

0 comments on commit a6c7e3e

Please sign in to comment.