Skip to content

Commit

Permalink
Fix github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gf-rog committed Nov 16, 2023
1 parent c58a286 commit 134cc7e
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,33 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Create .env file
run: touch db/credentials.env
# - name: Create .env file
# run: touch db/credentials.env

- name: Add login passes to env file
run: echo "NEO4J_AUTH=neo4j/admin" >> db/credentials.env
# - name: Add login passes to env file
# run: echo "NEO4J_AUTH=neo4j/admin123" >> db/credentials.env

- name: Compose the Docker-compose file
run: docker-compose up
- name: Build the Docker compose file
run: docker compose build

- name: Run Docker compose
run: docker compose up -d

- name: List containers
run: docker ps

- name: Wait for containers to start
run: |
sleep 15
docker run \
--rm \
--network mercury-project_default \
alpine/curl -o /dev/null --retry 3 --retry-connrefused backend:5000
- name: Test the backend
run: cd backend; npm i && npm run test run

- name: Shut down Docker compose
run: cd ..; docker compose down

0 comments on commit 134cc7e

Please sign in to comment.