Skip to content

Commit

Permalink
ci(TSC): Add tsc type-checking to Code Quality.yml workflow (#78)
Browse files Browse the repository at this point in the history
* ci(TSC): Add `tsc` type-checking to `Code Quality.yml` workflow

* ci(index.ts): Purposefuly break transformSource's context type to test TSC Job

* Revert "ci(index.ts): Purposefuly break transformSource's context type to test TSC Job"

This reverts commit 5c7dbf3.
  • Loading branch information
EntraptaJ authored May 26, 2020
1 parent 5872756 commit b06c867
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 6 deletions.
35 changes: 34 additions & 1 deletion .github/workflows/Code Quality.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Code Quality

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

jobs:
Prettier:
Expand All @@ -12,12 +18,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Run Prettier
run: npm run prettier

Expand All @@ -30,11 +39,35 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

TSC:
name: TSC Typecheck
strategy:
matrix:
os: ['ubuntu-latest']
node: ['14.x']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Run TSC Typechecking
run: npm run typecheck
11 changes: 10 additions & 1 deletion .github/workflows/Push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Testing

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

jobs:
Test:
Expand All @@ -12,11 +18,14 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Run Tests
run: npm run test
15 changes: 12 additions & 3 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: NPM Publish
name: Release

on:
push:
Expand All @@ -16,12 +16,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Run Tests
run: npm run test

Expand All @@ -31,18 +34,24 @@ jobs:
needs: [Test]
steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci
- name: Release

## Run [semantic-release](https://github.com/semantic-release/semantic-release) auto release/publish system
- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

## Dedicated bot user for all @K-FOSS Repos
GIT_AUTHOR_NAME: 'KJDev-Bots'
GIT_COMMITTER_NAME: 'KJDev-Bots'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_EMAIL: '[email protected]'
run: npx semantic-release
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"try": "node --loader ./out/dist/index.js --experimental-specifier-resolution=node ./test/",
"prepublishOnly": "npm run build",
"prettier": "prettier --config .prettierrc --check \"src/**/*ts\" \"bin/**/*.ts\"",
"lint": "eslint -c .eslintrc.json . --ext .js,.ts"
"lint": "eslint -c .eslintrc.json . --ext .js,.ts",
"typecheck": "tsc --noEmit"
},
"author": {
"email": "[email protected]",
Expand Down

0 comments on commit b06c867

Please sign in to comment.