Skip to content

Commit

Permalink
feat: infrastructure improvements
Browse files Browse the repository at this point in the history
- separated CI jobs
- added typescript checker
- enabled strick ts rules
  • Loading branch information
wallwhite committed Dec 21, 2021
1 parent aa26c40 commit 4799186
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 7 deletions.
63 changes: 57 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,72 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
install:
name: Install
runs-on: ubuntu-latest
continue-on-error: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: |
npm i
npm run lint
cache: 'npm'

- name: Install dependencies
run: npm i
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Pack artifact
run: tar czf /tmp/artifact.tar.gz .

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ui-kit-artifact
path: /tmp/artifact.tar.gz
retention-days: 1

eslint:
name: Eslint
runs-on: ubuntu-latest
needs: [install]
continue-on-error: false
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: ui-kit-artifact

- name: Unpack artifact
run: tar xf artifact.tar.gz

- name: Run eslint
run: npm run lint

typescript:
name: Typescript
runs-on: ubuntu-latest
needs: [install]
continue-on-error: false
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: ui-kit-artifact

- name: Unpack artifact
run: tar xf artifact.tar.gz

- name: Run typescript compile
run: yarn tsc --noEmit
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
Expand Down

0 comments on commit 4799186

Please sign in to comment.