Skip to content

Commit

Permalink
add github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Metod Ribič committed Nov 9, 2023
1 parent 26926e8 commit 659544f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: react-lib CI

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Check out branch
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'

- name: Install dependencies
run: yarn install

- name: Run lint
run: yarn lint
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"start": "yarn run mb watch --no-compress",
"prepare": "run-s build",
"test": "run-s test:unit test:lint test:build",
"lint": "yarn prettier ./src && eslint --quiet --ext .ts,.tsx ./src/",
"lint": "yarn prettier ./src && eslint --ext .ts,.tsx ./src/",
"lint:fix": "yarn prettier ./src && eslint --fix --ext .ts,.tsx ./src/",
"test:build": "run-s build",
"test:lint": "eslint .",
"test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
Expand Down

0 comments on commit 659544f

Please sign in to comment.