Skip to content
Closed
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
32 changes: 27 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
name: test
on:
push:
pull_request:
branches:
- master
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Start MinIO
run: |
docker run -d --name minio \
-p 9000:9000 \
-e MINIO_ROOT_USER=testAccessKey \
-e MINIO_ROOT_PASSWORD=testSecretKey \
minio/minio server /data
until curl -sf http://localhost:9000/minio/health/live; do sleep 1; done
docker exec minio mkdir -p /data/s3p-test

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16.x
- name: Install NPM dependencies
node-version: 20

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run tests
env:
S3_ENDPOINT: http://localhost:9000
AWS_ACCESS_KEY_ID: testAccessKey
AWS_SECRET_ACCESS_KEY: testSecretKey
AWS_REGION: us-east-1
run: npm test
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
s3:
image: minio/minio
volumes:
- minio-data:/data
entrypoint: sh
command: -c 'mkdir -p /data/s3p-test && /usr/bin/minio server --console-address=0.0.0.0:9002 /data'
ports:
- '9000:9000'
- '9002:9002'
environment:
MINIO_ROOT_USER: testAccessKey
MINIO_ROOT_PASSWORD: testSecretKey

volumes:
minio-data:
Loading
Loading