Skip to content

Commit

Permalink
ci: fix cov
Browse files Browse the repository at this point in the history
  • Loading branch information
v1rtl committed Jun 27, 2021
1 parent 6fae82b commit e040582
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 37 deletions.
43 changes: 6 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,58 +10,27 @@ on:
pull_request:
branches: [master]

env:
PNPM_CACHE_FOLDER: .pnpm-store

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# This workflow contains a single job called "test"
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: setup caching
uses: actions/cache@v2
with:
path: ${{ env.PNPM_CACHE_FOLDER }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Setup Node.js environment
uses: actions/setup-node@v2
- uses: actions/setup-node@v2-beta
with:
node-version: 14

node-version: '14.16.1'
- name: install pnpm
uses: pnpm/[email protected]
with:
version: 6.7.6

- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER

- name: install dependencies
run: pnpm install

- name: lint code
run: pnpm lint

- name: check formatting
run: pnpm format

- name: build packages
run: pnpm build

- name: run tests
version: 6.2.5
- run: pnpm install
- run: pnpm test:coverage
- run: pnpm test:report

- name: Coveralls
uses: coverallsapp/github-action@master
with:
Expand Down
6 changes: 6 additions & 0 deletions .huskyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"hooks": {
"pre-commit": "pnpm format && pnpm lint && pnpm test",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
14 changes: 14 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const defaultConfig = require('@commitlint/config-conventional')

module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
...defaultConfig.rules,
'type-enum': [
2,
'always',
['fix', 'test', 'tooling', 'refactor', 'revert', 'example', 'docs', 'format', 'feat', 'chore']
]
}
}

0 comments on commit e040582

Please sign in to comment.