From d5f32546c814e3a12db58ad855beeee342bbf4db Mon Sep 17 00:00:00 2001 From: Anthony Coughlin Date: Tue, 17 Dec 2024 13:53:43 +0000 Subject: [PATCH] Pathing debugging and removed Unit tests for debugging --- .github/workflows/test.yml | 67 +++++--------------------------------- 1 file changed, 9 insertions(+), 58 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c48387282c..74379b56c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,62 +1,6 @@ name: Test on: [push, pull_request] jobs: - Tests: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x] - steps: - - uses: actions/checkout@v4 - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.1.0 - with: - node-version: ${{ matrix.node-version }} - - name: Node.js modules cache, repository - uses: actions/cache@v4 - id: repo-cache - with: - path: ${{ github.workspace }}/node_modules - key: ${{ runner.os }}-${{ matrix.node-version }}-modules-repo-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.node-version }}-modules-repo - - name: Node.js modules cache, backend - uses: actions/cache@v4 - id: backend-cache - with: - path: ${{ github.workspace }}/backend/node_modules - key: ${{ runner.os }}-${{ matrix.node-version }}-modules-backend-${{ hashFiles('**/backend/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.node-version }}-modules-backend - - name: Node.js modules cache, frontend - uses: actions/cache@v4 - id: frontend-cache - with: - path: | - ~/.cache/Cypress - ${{ github.workspace }}/frontend/node_modules - key: ${{ runner.os }}-${{ matrix.node-version }}-modules-frontend-${{ hashFiles('**/frontend/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.node-version }}-modules-frontend - - name: Install Node.js packages - if: ${{ steps.repo-cache.outputs.cache-hit != 'true' || steps.backend-cache.outputs.cache-hit != 'true' || steps.frontend-cache.outputs.cache-hit != 'true' }} - run: npm install - - name: Check for uncomitted changes - run: | - git diff --exit-code - - name: Test backend & frontend unit tests with coverage - if: ${{ success() }} - run: npm run test:backend && npm run test:frontend:unit-coverage - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.6.0 - with: - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: false - name: frontend - directory: ./frontend/coverage - verbose: true - CypressMockTests: runs-on: ubuntu-latest needs: Tests @@ -74,10 +18,18 @@ jobs: - name: Install Node.js packages for Cypress run: npm install - + - name: Get test files id: test-files run: | + echo "Current working directory:" + pwd + echo "Listing contents of the current directory:" + ls -la + + TEST_DIR="frontend/src/__tests__/cypress/cypress/tests/mocked" + echo "Checking for test files in $TEST_DIR" + if [ -d "frontend/src/__tests__/cypress/cypress/tests/mocked" ]; then TEST_FILES=$(find frontend/src/__tests__/cypress/cypress/tests/mocked -name "*.cy.ts" | tr '\n' ',') echo "files=$TEST_FILES" >> $GITHUB_OUTPUT @@ -85,7 +37,6 @@ jobs: echo "Directory does not exist. No test files found." >> $GITHUB_OUTPUT echo "files=" >> $GITHUB_OUTPUT # Set empty output if no files found fi - - name: Run Cypress Mock Tests in Parallel run: |