Skip to content

Commit

Permalink
trying another clenaup of workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aasimsyed committed Apr 23, 2024
1 parent 8475574 commit 12efc49
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions .github/workflows/pr_ci_frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Clean up any existing containers
run: |
docker stop $(docker ps -aq) || true
docker rm $(docker ps -aq) || true
- name: Check Port Availability
run: |
! nc -z localhost ${{ secrets.FRONTEND_PORT }} && \
! nc -z localhost ${{ secrets.BACKEND_PORT }} && \
! nc -z localhost 5432
- name: Set up Docker Compose
run: |
echo "FRONTEND_PORT=${{ secrets.FRONTEND_PORT }}" >> .env
echo "BACKEND_PORT=${{ secrets.BACKEND_PORT }}" >> .env
echo "DATABASE_PORT=${{ secrets.DATABASE_PORT }}" >> .env
echo "DATABASE_HOST=postgres" >> .env # Using the service name from the services section
echo "DATABASE_HOST=postgres" >> .env
echo "DATABASE_NAME=${{ secrets.DATABASE_NAME }}" >> .env
echo "DATABASE_USER=${{ secrets.DATABASE_USER }}" >> .env
echo "DATABASE_PASSWORD=${{ secrets.DATABASE_PASSWORD }}" >> .env
Expand All @@ -53,25 +42,24 @@ jobs:
- name: Run Docker Compose
run: docker-compose -f docker-compose.yml up -d

- name: Setup Node environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
node-version: '16'
cache: 'yarn'

- name: Install Yarn
uses: borales/actions-yarn@v5
with:
cmd: install
dir: "frontend"
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Install Prettier
- name: Install dependencies
working-directory: ./frontend
run: yarn add prettier
run: |
yarn install --frozen-lockfile
- name: Run Prettier - Formatting check
working-directory: ./frontend
run: |
yarn prettier . --check --config ../.prettierrc --ignore-path ../.prettierignore
yarn prettier --check .
- name: Run Type Check
working-directory: ./frontend
Expand Down

0 comments on commit 12efc49

Please sign in to comment.