Skip to content

Commit

Permalink
chore: adding CI
Browse files Browse the repository at this point in the history
  • Loading branch information
artursudnik committed Aug 11, 2023
1 parent 8a31458 commit c7bd7a0
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on: push

jobs:
install:
name: Install dependencies
runs-on: ubuntu-latest

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

- name: Setup app dependencies
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock') }}
restore-keys: |
${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock') }}
${{ runner.os }}-node_modules
- name: Install
run: npm ci

lint:
name: Lint code
runs-on: ubuntu-latest
needs: [install]

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

- name: Setup app dependencies
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Restore dependencies
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
fail-on-cache-miss: true

- name: Run prettier
run: yarn prettier:check

- name: Run eslint
run: npm run lint

0 comments on commit c7bd7a0

Please sign in to comment.