-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(tests): added unit tests and lint workflows (#11)
* ci(tests): added unit tets * fix(github- workflows): split to two different .yml files for each job category
- Loading branch information
Showing
2 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
name: Lint | ||
|
||
on: [pull_request] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
eslint: | ||
name: Run eslint | ||
name: Run TS Project eslint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
- name: Check out TS Project Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
# ESLint and Prettier must be in `package.json` | ||
- name: Install Node.js dependencies | ||
run: npm install | ||
|
||
- name: Run linters | ||
uses: samuelmeuli/lint-action@v1 | ||
- name: Run TS Project linters | ||
uses: wearerequired/lint-action@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
# Enable linters | ||
eslint: true | ||
eslint_extensions: ts | ||
# prettier: true | ||
eslint_dir: ./src | ||
eslint_extensions: ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
name: Run TS Project eslint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out TS Project Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Install Node.js dependencies | ||
run: npm install | ||
|
||
- name: Run unit tests | ||
uses: actions/checkout@v2 | ||
run: npm run unit-tests | ||
with: | ||
github_token: ${{ secrets.github_token }} |