Skip to content

Commit

Permalink
chore: setup quality job
Browse files Browse the repository at this point in the history
  • Loading branch information
c100k committed Mar 21, 2024
1 parent ae6280e commit 217ee31
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: quality
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#push
on: [push]
jobs:
main:
# https://github.com/actions/runner-images
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v1

# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Uncache Yarn dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: |
yarn install
- name: Lint
run: |
yarn lint:ci
- name: Test
run: |
yarn test:ci
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.1.0",
"scripts": {
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --cache --debug --fix && prettier --write '**/*.json'",
"lint:ci": "eslint . --ext .js,.jsx,.ts,.tsx && prettier '**/*.json'"
"lint:ci": "eslint . --ext .js,.jsx,.ts,.tsx && prettier '**/*.json'",
"test:ci": "tsc"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.3.1",
Expand Down

0 comments on commit 217ee31

Please sign in to comment.