diff --git a/.github/workflows/app-codecov-test.yml b/.github/workflows/app-codecov-test.yml new file mode 100644 index 000000000..32b6a9fba --- /dev/null +++ b/.github/workflows/app-codecov-test.yml @@ -0,0 +1,72 @@ +name: APP (React 18) + +on: + push: + branches: [dev] + paths: + - 'frontend/**' # Triggers on changes to files in the frontend/ directory. + - '!frontend/cypress/**' # Will not trigger on changes to the following. + - '!frontend/cypress.config.*' + - '!frontend/.eslintrc.*' + - '!frontend/.prettierrc.*' + - '!frontend/Dockerfile*' + - '!frontend/nginx.conf' + - '!frontend/vite.config.*' + pull_request: + types: [opened, synchronize] # Triggered by opened or changed pull requests. + branches: [dev] + paths: + - 'frontend/**' # Triggers on changes to files in the frontend/ directory. + - '!frontend/cypress/**' # Will not trigger on changes to the following. + - '!frontend/cypress.config.*' + - '!frontend/.eslintrc.*' + - '!frontend/.prettierrc.*' + - '!frontend/Dockerfile*' + - '!frontend/nginx.conf' + - '!frontend/vite.config.*' + - '.github/workflows/app-codecov-test.yml' + +jobs: + build: + runs-on: ubuntu-latest + env: + CI: true + working-directory: ./frontend + codeCov-token: ${{ secrets.CodeCov }} + + strategy: + matrix: + node-version: [18] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - run: npm i + working-directory: ${{env.working-directory}} + + # - run: npm run build --if-present + # working-directory: ${{env.working-directory}} + + - run: npm run coverage + working-directory: ${{env.working-directory}} + + - name: Codecov + uses: codecov/codecov-action@v3 + with: + # User defined upload name. Visible in Codecov UI + name: PIMS + # Repository upload token - get it from codecov.io. Required only for private repositories + token: ${{env.codeCov-token}} + # Path to coverage file to upload + file: ${{env.working-directory}}/coverage/lcov.info + # Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome) + flags: unittests + # Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON) + env_vars: javascript + # Specify whether or not CI build should fail if Codecov runs into an error during upload + fail_ci_if_error: true diff --git a/.github/workflows/app-jest-coverage.yml b/.github/workflows/app-jest-coverage.yml index 9b31e2a3c..6d99c48d2 100644 --- a/.github/workflows/app-jest-coverage.yml +++ b/.github/workflows/app-jest-coverage.yml @@ -14,12 +14,13 @@ on: - '!frontend/vite.config.*' - '!frontend/tsconfig.json' - '!frontend/README.md' + - '.github/workflows/app-jest-coverage.yml' jobs: codeclimate-jest-coverage: runs-on: ubuntu-latest env: - GIT_BRANCH: ${{ github.event.pull_request.head.ref }} + GIT_BRANCH: dev GIT_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} CC_TEST_REPORTER_ID: 37fdb6f058122c17fc2419b78b02b1d5582694f7cd84a2b735de8eec235e9c5b diff --git a/frontend/src/components/common/form/StepForm/__snapshots__/SteppedForm.test.tsx.snap b/frontend/src/components/common/form/StepForm/__snapshots__/SteppedForm.test.tsx.snap index 4e92dc78e..22b16cdf2 100644 --- a/frontend/src/components/common/form/StepForm/__snapshots__/SteppedForm.test.tsx.snap +++ b/frontend/src/components/common/form/StepForm/__snapshots__/SteppedForm.test.tsx.snap @@ -119,21 +119,9 @@ exports[`SteppedForm component renders correctly 1`] = ` >
+ Please review the information you have entered. You can edit it by clicking on the edit icon for each section. When you are satisfied that the information provided is correct, click the submit button to save this information to the PIMS inventory. +
+Please review the information you have entered. You can edit it by clicking on the edit icon for each section. When you are satisfied that the information provided is correct, click the submit button to save this information to the PIMS inventory.