Skip to content
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
5 changes: 5 additions & 0 deletions .env.minio.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
AWS_ACCESS_KEY=minioadmin
AWS_SECRET_KEY=minioadmin
AWS_REGION=us-east-1
BUCKET_NAME=test-bucket
MINIO_ENDPOINT=http://localhost:9000
54 changes: 41 additions & 13 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,38 @@ on:
workflow_dispatch:

jobs:
# Label of the container job
container-job:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in
# container: node:latest
# container: pyramation/node-gyp
container: node:20.12.0-alpine

# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
pg_db:
image: pyramation/postgis
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
# Set health checks to wait until postgres has started
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_cdn:
image: minio/minio:edge-cicd
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- 9000:9000
- 9001:9001
options: >-
--health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -51,8 +54,9 @@ jobs:
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_HOST: localhost
POSTGRES_HOST: pg_db
POSTGRES_PORT: 5432
DATABASE_URL: postgres://postgres:password@pg_db:5432/postgres

- name: launchql/orm
run: cd ./packages/orm && yarn test
Expand All @@ -65,3 +69,27 @@ jobs:

- name: launchql/codegen
run: cd ./packages/codegen && yarn test

- name: launchql/content-type-stream
run: cd ./packages/content-type-stream && yarn test

- name: launchql/s3-streamer
run: cd ./packages/s3-streamer && yarn test
env:
MINIO_ENDPOINT: http://minio_cdn:9000
AWS_ACCESS_KEY: minioadmin
AWS_SECRET_KEY: minioadmin
AWS_REGION: us-east-1
BUCKET_NAME: test-bucket

- name: launchql/stream-to-s3
run: cd ./packages/stream-to-s3 && yarn test
env:
MINIO_ENDPOINT: http://minio_cdn:9000
AWS_ACCESS_KEY: minioadmin
AWS_SECRET_KEY: minioadmin
AWS_REGION: us-east-1
BUCKET_NAME: test-bucket

- name: launchql/upload-names
run: cd ./packages/upload-names && yarn test
1 change: 1 addition & 0 deletions __fixtures__/kitchen-sink/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
33 changes: 33 additions & 0 deletions __fixtures__/kitchen-sink/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
language: node_js
notifications:
email: false
node_js:
- node
services:
- docker
env:
global:
- PGPORT=7777
- PGDATABASE=testing-db
- PGTEMPLATE_DATABASE=testing-template-db
- PGHOST=localhost
- PGPASSWORD=
- PGUSER=postgres
- TMPDIR=/tmp
matrix:
- PACKAGE=core/skitch-testing
- PACKAGE=core/skitch-transform
- PACKAGE=core/skitch-utils
before_install:
- sudo apt-get -qq update
- sudo apt-get install -qy --force-yes perl build-essential cpanminus
- PERL_MM_USE_DEFAULT=1 sudo cpan List::MoreUtils >/dev/null 2>/dev/null
- PERL_MM_USE_DEFAULT=1 sudo cpan DBD::Pg >/dev/null 2>/dev/null
- PERL_MM_USE_DEFAULT=1 sudo cpan App::Sqitch >/dev/null 2>/dev/null
- docker run -p 7777:5432 --name postgritty -d postgres:10.3
- sleep 3
- while ! docker exec -it postgritty pg_isready -U postgres -h 127.0.0.1; do echo "$(date) - waiting for database to start"; sleep 1; done
script:
- cd $PACKAGE
- yarn install
- yarn test
3 changes: 3 additions & 0 deletions __fixtures__/kitchen-sink/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Copyright (c) 2020-present, Web, Inc. All rights reserved.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL WE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading