Skip to content

Commit

Permalink
ci(tests): added unit tests and lint workflows (#11)
Browse files Browse the repository at this point in the history
* ci(tests): added unit tets

* fix(github- workflows): split to two different .yml files for each job category
  • Loading branch information
galta95 authored Nov 29, 2020
1 parent a78eca8 commit 57f1734
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/main.yml → .github/workflows/lint.yml
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
26 changes: 26 additions & 0 deletions .github/workflows/tests.yml
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 }}

0 comments on commit 57f1734

Please sign in to comment.