diff --git a/.gitea/workflows/checkReferenceType.yaml b/.gitea/workflows/checkReferenceType.yaml index c7b7802..a38deca 100644 --- a/.gitea/workflows/checkReferenceType.yaml +++ b/.gitea/workflows/checkReferenceType.yaml @@ -1,5 +1,5 @@ name: CI -run-name: ${{ github.actor }} is testing out Gitea Actions +run-name: Running tests for checkReferenceType branch on: push: branches: @@ -9,18 +9,23 @@ jobs: test: runs-on: ubuntu-latest services: - mydb: - image: postgres:latest - # container_name: mydb - env: - POSTGRES_USER: alice - POSTGRES_PASSWORD: iEx4Vj7zBb6 - POSTGRES_DB: tethys_dev - ports: - # Maps tcp port 5432 on service container to the host - - 5432:5432 - # Set health checks to wait until postgres has started - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + mydb: + image: postgres:latest + # container_name: mydb + env: + POSTGRES_USER: alice + POSTGRES_PASSWORD: iEx4Vj7zBb6 + POSTGRES_DB: tethys_dev + ports: + # Maps tcp port 5432 on service container to the host + - 5432:5432 + # Set health checks to wait until postgres has started + options: | + --health-cmd pg_isready + --hostname mydb + --health-interval 10s + --health-timeout 5s + --health-retries 5 steps: - name: Checkout repository uses: actions/checkout@v2 @@ -37,26 +42,29 @@ jobs: run: cp .env.example .env.test - name: Set up environment variables - run: echo "DB_CONNECTION=pg" >> .env.test - && echo "PG_HOST=mydb" >> .env.test - && echo "PG_PORT=5432" >> .env.test - && echo "PG_USER=alice" >> .env.test - && echo "PG_PASSWORD=iEx4Vj7zBb6" >> .env.test - && echo "PG_DB_NAME=tethys_dev" >> .env.test - && echo "NODE_ENV=test" >> .env.test - && echo "ASSETS_DRIVER=fake" >> .env.test - && echo "SESSION_DRIVER=memory" >> .env.test - && echo "HASH_DRIVER=bcrypt" >> .env.test - && echo "HOST=127.0.0.1" >> .env.test - && echo "PORT=3333" >> .env.test - && echo "APP_NAME=TethysCloud" >> .env.test - && echo "APP_URL=http://${HOST}:${PORT}" >> .env.test - && echo "CACHE_VIEWS=false" >> .env.test - && echo "APP_KEY=pfi5N2ACN4tMJ5d8d8BPHfh3FEuvleej" >> .env.test - && echo "DRIVE_DISK=local" >> .env.test - && echo "OAI_LIST_SIZE=200" >> .env.test - && echo "OPENSEARCH_HOST=http://localhost" >> .env.test - && echo "OPENSEARCH_CORE=tethys-records" >> .env.test + env: + PG_HOST: mydb + run: | + echo "DB_CONNECTION=pg" >> .env.test + echo "PG_HOST=mydb" >> .env.test + echo "PG_PORT=5432" >> .env.test + echo "PG_USER=alice" >> .env.test + echo "PG_PASSWORD=iEx4Vj7zBb6" >> .env.test + echo "PG_DB_NAME=tethys_dev" >> .env.test + echo "NODE_ENV=test" >> .env.test + echo "ASSETS_DRIVER=fake" >> .env.test + echo "SESSION_DRIVER=memory" >> .env.test + echo "HASH_DRIVER=bcrypt" >> .env.test + echo "HOST=127.0.0.1" >> .env.test + echo "PORT=3333" >> .env.test + echo "APP_NAME=TethysCloud" >> .env.test + echo "APP_URL=http://${HOST}:${PORT}" >> .env.test + echo "CACHE_VIEWS=false" >> .env.test + echo "APP_KEY=pfi5N2ACN4tMJ5d8d8BPHfh3FEuvleej" >> .env.test + echo "DRIVE_DISK=local" >> .env.test + echo "OAI_LIST_SIZE=200" >> .env.test + echo "OPENSEARCH_HOST=http://localhost" >> .env.test + echo "OPENSEARCH_CORE=tethys-records" >> .env.test - name: Run tests run: node ace test functional --groups "ReferenceValidation" \ No newline at end of file