Skip to content

Commit

Permalink
Update pull-request.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Manik2708 authored Jun 2, 2024
1 parent d30d01e commit 6c035ca
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ jobs:
uses: actions/checkout@v4

- name: Create Testing Environment
run: |
chmod +x scripts/docker_compose_up.sh
scripts/docker_compose_up.sh
working-directory: scripts
run: docker compose up -d --no-color --wait
working-directory: test

- name: Install dependencies
run: npm install
Expand All @@ -100,36 +98,42 @@ jobs:
run: npm run test:e2e

- name: Remove Testing Environment
run: |
chmod +x scripts/docker_compose_down.sh
scripts/docker_compose_down.sh
working-directory: scripts
run: docker compose down
working-directory: test

Build-Application:
name: Build application
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create .env file
run: touch .env

- name: Edit file for running on docker
run: echo "RUNNING_ON_DOCKER=true" >> .env

- name: Create Docker network
run: docker create network hi-srvices

- name: Create Build Environment
- name: Start Build services
run: docker compose up -d --no-color --wait
working-directory: scripts

- name: Install dependencies
run: npm install

- name: Build Docker image
run: docker build -t hi-server .

- name: Sleep for 10s
run: sleep 10
- name: Run Docker server
run: docker --name hi-container --network hi-services run hi-server

- name: Create .env file
run: touch .env
- name: Remove Build Services
run: docker compose down

- name: Edit file for running on docker
run: echo "RUNNING_ON_DOCKER=true" >> .env
- name: Stop server
run: docker stop hi-container

- name: Build server
run: npm run build
- name: Remove Docker Container
run: docker rm hi-container

- name: Remove Build Environment
run: docker compose down
- name: Remove docker image
run: docker rmi hi-server

0 comments on commit 6c035ca

Please sign in to comment.