Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTING CODE CLIMATE COVERAGE - NO MERGE #1773

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/app-codecov-test.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion .github/workflows/app-jest-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,9 @@ exports[`SteppedForm component renders correctly 1`] = `
>
<div>
<div
class="primary"
style="color: black;"
>
<svg
fill="currentColor"
height="20"
stroke="currentColor"
stroke-width="0"
viewBox="0 0 448 512"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"
/>
</svg>
Add another associated Parcel
</div>
</div>
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,31 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`HeaderActions View HeaderActions renders correctly 1`] = `
.c0 {
background-color: filterBackgroundColor;
height: 35px;
width: 322px;
margin: 0px 0px 5px -10px;
font-size: 14px;
padding: 10px;
}

.c0 a {
padding: 0px 10px;
color: slideOutBlue;
}

.c1 {
border-left: 2px solid rgba(96, 96, 96, 0.2);
height: 18px;
width: 0;
padding: 0;
}

<div
class="c0 row"
class="link-menu"
>
Actions:
<a
class="header-link"
href="/mapview?sidebar=true&disabled=true&loadDraft=false&buildingId=undefined&parcelId=1"
style="width: 95px;"
>
View details
</a>
<div
class="c1"
class="vertical-bar"
/>
<a
class="header-link"
href="/mapview?sidebar=true&disabled=false&loadDraft=false&buildingId=undefined&parcelId=1"
style="width: 63px;"
>
Update
</a>
<div
class="c1"
class="vertical-bar"
/>
<a
class="header-link"
href="/"
style="width: 90px;"
>
Zoom map
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,21 +238,9 @@ exports[`Building Form component renders correctly 1`] = `
>
<div>
<div
class="primary"
style="color: black;"
>
<svg
fill="currentColor"
height="20"
stroke="currentColor"
stroke-width="0"
viewBox="0 0 448 512"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"
/>
</svg>
Add another associated Parcel
</div>
</div>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,21 +220,9 @@ exports[`Land Form component renders correctly 1`] = `
>
<div>
<div
class="primary"
style="color: black;"
>
<svg
fill="currentColor"
height="20"
stroke="currentColor"
stroke-width="0"
viewBox="0 0 448 512"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"
/>
</svg>
Add another associated Parcel
</div>
</div>
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AssociatedLandReviewPage renders correctly 1`] = `
<div
class="review-section container"
>
<div
class="review-steps row"
>
<h4>
Review associated land information
</h4>
<p>
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.
</p>
</div>
</div>
`;
Loading