From 12efc497be21d61c12d4db0e9a18d02b8fd07112 Mon Sep 17 00:00:00 2001 From: aasim Date: Tue, 23 Apr 2024 19:05:51 -0400 Subject: [PATCH] trying another clenaup of workflow --- .github/workflows/pr_ci_frontend.yaml | 32 +++++++++------------------ 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pr_ci_frontend.yaml b/.github/workflows/pr_ci_frontend.yaml index 2b2ba7bfc..82b8fdd18 100644 --- a/.github/workflows/pr_ci_frontend.yaml +++ b/.github/workflows/pr_ci_frontend.yaml @@ -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 @@ -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