Skip to content

First pass at S3 tests #153

First pass at S3 tests

First pass at S3 tests #153

Workflow file for this run

name: Default Build & Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: secret
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
minio:
image: minio/minio:edge-cicd
ports:
- 9000:9000
options: >-
--health-cmd "curl -s http://localhost:9000/minio/health/live"
strategy:
matrix:
node-version: [16.x]
steps:
# get minio admin client
- name: Fetch mc client
run: curl -o ./mc -# https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x ./mc
# create S3 bucket called test
- name: Create the dev bucket
run: ./mc alias set minio http://localhost:9000 minioadmin minioadmin && ./mc mb minio/test
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install
- name: Run tests
run: npm run lint && npm run test