parent
c17843106a
commit
24be13ee63
1 changed files with 66 additions and 65 deletions
|
@ -1,75 +1,76 @@
|
||||||
name: CI
|
name: CI
|
||||||
run-name: Running tests for checkReferenceType branch
|
run-name: Running tests for checkReferenceType branch
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- feat/checkReferenceType
|
- feat/checkReferenceType
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Docker Hub image that `container-job` executes in
|
# Docker Hub image that `container-job` executes in
|
||||||
container: node:20-bullseye
|
container: node:20-bullseye
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mydb:
|
# Label used to access the service container
|
||||||
image: postgres:latest
|
mydb:
|
||||||
container_name: mydb
|
image: postgres:latest
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: alice
|
POSTGRES_USER: alice
|
||||||
POSTGRES_PASSWORD: iEx4Vj7zBb6
|
POSTGRES_PASSWORD: iEx4Vj7zBb6
|
||||||
POSTGRES_DB: tethys_dev
|
POSTGRES_DB: tethys_dev
|
||||||
# ports:
|
# ports:
|
||||||
# - 5432:5432
|
# - 5432:5432
|
||||||
options: |
|
options: |
|
||||||
--health-cmd pg_isready
|
--health-cmd pg_isready
|
||||||
--hostname mydb
|
--name mydb
|
||||||
--health-interval 10s
|
--hostname mydb
|
||||||
--health-timeout 5s
|
--health-interval 10s
|
||||||
--health-retries 5
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# - name: Set up Node.js
|
# - name: Set up Node.js
|
||||||
# uses: actions/setup-node@v2
|
# uses: actions/setup-node@v2
|
||||||
# with:
|
# with:
|
||||||
# node-version: '20'
|
# node-version: '20'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Create .env.test file
|
- name: Create .env.test file
|
||||||
run: cp .env.example .env.test
|
run: cp .env.example .env.test
|
||||||
|
|
||||||
- name: Set up environment variables
|
- name: Set up environment variables
|
||||||
env:
|
env:
|
||||||
POSTGRES_HOST: mydb
|
POSTGRES_HOST: mydb
|
||||||
POSTGRES_PORT: 5432
|
POSTGRES_PORT: 5432
|
||||||
POSTGRES_PASSWORD: iEx4Vj7zBb6
|
POSTGRES_PASSWORD: iEx4Vj7zBb6
|
||||||
POSTGRES_USER: alice
|
POSTGRES_USER: alice
|
||||||
run: |
|
run: |
|
||||||
echo "DB_CONNECTION=pg" >> .env.test
|
echo "DB_CONNECTION=pg" >> .env.test
|
||||||
echo "PG_HOST=mydb" >> .env.test
|
echo "PG_HOST=mydb" >> .env.test
|
||||||
echo "PG_PORT=5432" >> .env.test
|
echo "PG_PORT=5432" >> .env.test
|
||||||
echo "PG_USER=alice" >> .env.test
|
echo "PG_USER=alice" >> .env.test
|
||||||
echo "PG_PASSWORD=iEx4Vj7zBb6" >> .env.test
|
echo "PG_PASSWORD=iEx4Vj7zBb6" >> .env.test
|
||||||
echo "PG_DB_NAME=tethys_dev" >> .env.test
|
echo "PG_DB_NAME=tethys_dev" >> .env.test
|
||||||
echo "NODE_ENV=test" >> .env.test
|
echo "NODE_ENV=test" >> .env.test
|
||||||
echo "ASSETS_DRIVER=fake" >> .env.test
|
echo "ASSETS_DRIVER=fake" >> .env.test
|
||||||
echo "SESSION_DRIVER=memory" >> .env.test
|
echo "SESSION_DRIVER=memory" >> .env.test
|
||||||
echo "HASH_DRIVER=bcrypt" >> .env.test
|
echo "HASH_DRIVER=bcrypt" >> .env.test
|
||||||
echo "HOST=127.0.0.1" >> .env.test
|
echo "HOST=127.0.0.1" >> .env.test
|
||||||
echo "PORT=3333" >> .env.test
|
echo "PORT=3333" >> .env.test
|
||||||
echo "APP_NAME=TethysCloud" >> .env.test
|
echo "APP_NAME=TethysCloud" >> .env.test
|
||||||
echo "APP_URL=http://${HOST}:${PORT}" >> .env.test
|
echo "APP_URL=http://${HOST}:${PORT}" >> .env.test
|
||||||
echo "CACHE_VIEWS=false" >> .env.test
|
echo "CACHE_VIEWS=false" >> .env.test
|
||||||
echo "APP_KEY=pfi5N2ACN4tMJ5d8d8BPHfh3FEuvleej" >> .env.test
|
echo "APP_KEY=pfi5N2ACN4tMJ5d8d8BPHfh3FEuvleej" >> .env.test
|
||||||
echo "DRIVE_DISK=local" >> .env.test
|
echo "DRIVE_DISK=local" >> .env.test
|
||||||
echo "OAI_LIST_SIZE=200" >> .env.test
|
echo "OAI_LIST_SIZE=200" >> .env.test
|
||||||
echo "OPENSEARCH_HOST=http://localhost" >> .env.test
|
echo "OPENSEARCH_HOST=http://localhost" >> .env.test
|
||||||
echo "OPENSEARCH_CORE=tethys-records" >> .env.test
|
echo "OPENSEARCH_CORE=tethys-records" >> .env.test
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: node ace test functional --groups "ReferenceValidation"
|
run: node ace test functional --groups "ReferenceValidation"
|
||||||
|
|
Loading…
Add table
Reference in a new issue