Skip to content

Commit

Permalink
Feature/HEY-UI-43 Implement add test and lint checking by PR
Browse files Browse the repository at this point in the history
Add build actions

* test jest checking
* lint checking
* build packages
* add default reviewer for PR's
  • Loading branch information
derek-heycar authored Apr 7, 2022
1 parent f0100b8 commit a12d7d1
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/auto_assign-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
addAssignees: true

assignees:
- derek-heycar
- hey-igor
- mwagdi
11 changes: 11 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
addReviewers: true

reviewers:
- derek-heycar
- hey-igor
- mwagdi

skipKeywords:
- wip

numberOfReviewers: 0
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tests & Build

on:
pull_request:
branches:
- develop
- master
push:
branches:
- develop
- master

jobs:
test:
name: run tests

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: npm i

- name: Run lint
run: npm run lint

- name: Run test
run: npm run test -- --coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Jest coverage report
uses: ArtiomTr/[email protected]

build:
name: build packages

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: npm i

- name: Run build
run: npm run build
env:
BUILD_CONCURRENCY: 5
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/dist
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# HeyCar

[![Tests](https://github.com/hey-car/hey-ui/actions/workflows/build.yml/badge.svg)](https://github.com/hey-car/hey-ui/actions/workflows/build.yml)
[![Coverage Status](https://coveralls.io/repos/github/hey-car/hey-ui/badge.svg)](https://coveralls.io/github/hey-car/hey-ui)

## Get started with the storybook

```bash
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"clean": "rimraf packages/*/{tsconfig.tsbuildinfo,dist} && rimraf {dist,build}",
"start": "start-storybook -p 9009 -c .storybook",
"build-storybook": "build-storybook -o build -s ./.storybook/public --quiet",
"lint": "npm run lint:css && npm run lint:js",
"lint:css": "stylelint ./packages/**/*.css",
"lint:js": "eslint ./packages --ext .ts,.tsx,.js,.jsx",
"test": "jest --watchAll=false",
"postbuild": "npm run purgecss",
Expand Down
2 changes: 1 addition & 1 deletion packages/vars/src/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
--color-red-600: #d73535;
--color-red-700: #c61a1a;
--color-red-800: #b90606;
--color-red-900: #aa0000;
--color-red-900: #a00;
}

1 comment on commit a12d7d1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 100% 19/19
🔴 Branches 50% 2/4
🟢 Functions 100% 1/1
🟢 Lines 100% 17/17

Test suite run success

6 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from a12d7d1

Please sign in to comment.