Skip to content

Commit

Permalink
testing bun ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nhoss2 committed Jun 21, 2024
1 parent ab792dd commit 0996640
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
test:
name: 'test'
runs-on: ubuntu-latest

strategy:
Expand All @@ -21,4 +22,18 @@ jobs:
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run test
- run: npm run test

bun:
name: 'bun'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.x'
- uses: oven-sh/setup-bun@v1
with:
bun-version: '1.1.15'
- run: bun install
- run: bun run test
9 changes: 4 additions & 5 deletions src/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type {
} from "@aws-sdk/client-s3";

import { logger } from "./logger";
import { getConfig } from "./config";

export const createS3Client = (
accessKeyId: string,
Expand All @@ -30,11 +31,9 @@ export const createS3Client = (
};

export const getClient = async () => {
const accessKeyId = process.env.ACCESS_KEY_ID!;
const secretAccessKey = process.env.SECRET_KEY!;
const endpointUrl = process.env.ENDPOINT_URL!;

return createS3Client(accessKeyId, secretAccessKey, endpointUrl);
const config = getConfig();
const { accessKeyId, secretKey, endpointUrl } = config.credentials!;
return createS3Client(accessKeyId, secretKey, endpointUrl);
};

export const listBucketObjects = async (
Expand Down

0 comments on commit 0996640

Please sign in to comment.