This commit is contained in:
parent
239002bc71
commit
e83887d32c
1 changed files with 13 additions and 12 deletions
|
@ -14,10 +14,10 @@ jobs:
|
||||||
services:
|
services:
|
||||||
# Label used to access the service container
|
# Label used to access the service container
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:latest
|
image: postgres:latest
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: alice
|
POSTGRES_USER: alice
|
||||||
POSTGRES_PASSWORD: iEx4Vj7zBb6
|
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
|
||||||
POSTGRES_DB: tethys_dev
|
POSTGRES_DB: tethys_dev
|
||||||
# ports:
|
# ports:
|
||||||
# - 5432:5432
|
# - 5432:5432
|
||||||
|
@ -25,7 +25,7 @@ jobs:
|
||||||
--health-cmd pg_isready
|
--health-cmd pg_isready
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -37,22 +37,23 @@ jobs:
|
||||||
# node-version: '20'
|
# node-version: '20'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm ci
|
||||||
|
|
||||||
- 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: postgres
|
# POSTGRES_HOST: postgres
|
||||||
POSTGRES_PORT: 5432
|
# POSTGRES_PORT: 5432
|
||||||
POSTGRES_PASSWORD: iEx4Vj7zBb6
|
# POSTGRES_PASSWORD: ${{ secrets.PG_PASSWORD }}
|
||||||
POSTGRES_USER: alice
|
# POSTGRES_USER: alice
|
||||||
run: |
|
run: |
|
||||||
echo "DB_CONNECTION=pg" >> .env.test
|
echo "DB_CONNECTION=pg" >> .env.test
|
||||||
|
echo "PG_HOST=postgres" >> .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=${{ secrets.PG_PASSWORD }}" >> .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
|
||||||
|
@ -66,7 +67,7 @@ jobs:
|
||||||
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=${{ secrets.OPENSEARCH_HOST }}" >> .env.test
|
||||||
echo "OPENSEARCH_CORE=tethys-records" >> .env.test
|
echo "OPENSEARCH_CORE=tethys-records" >> .env.test
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|
Loading…
Add table
Reference in a new issue