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

5 add codeclimate with coverage and smells #20

Merged
merged 13 commits into from
Feb 1, 2023
72 changes: 39 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,42 @@ jobs:
node-version: [16.19.0]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: |
yarn install --frozen-lockfile

- name: Run Tests
run: |
yarn test:coverage

- name: Run Prettier
run: |
yarn prettier

- name: Run Lint
run: |
yarn lint

- name: Run Build
run: |
yarn rollup
- name: Checkout code
uses: actions/checkout@v3

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: |
yarn install --frozen-lockfile

- name: Run Tests
run: |
yarn test:coverage

- uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: yarn test:coverage

- name: Run Prettier
run: |
yarn prettier

- name: Run Lint
run: |
yarn lint

- name: Run Build
run: |
yarn build
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"node": "16.19.x"
},
"scripts": {
"rollup": "rollup -c",
"build": "rollup -c",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"lint": "eslint",
Expand Down