Skip to content

Commit

Permalink
refactor(.github/workflows): added linting to tests directories
Browse files Browse the repository at this point in the history
  • Loading branch information
galta95 committed Nov 29, 2020
1 parent 57f1734 commit e6ca108
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Lint

on: [push, pull_request]
on: [pull_request]

jobs:
eslint:
Expand All @@ -16,7 +16,8 @@ jobs:
with:
node-version: 12

- name: Install Node.js dependencies
- name: Install TS Project dependencies
working-directory: ./src
run: npm install

- name: Run TS Project linters
Expand All @@ -25,5 +26,5 @@ jobs:
github_token: ${{ secrets.github_token }}
# Enable linters
eslint: true
eslint_dir: ./src
eslint_dir: ./src/**/*.ts tests/**/*.ts
eslint_extensions: ts
13 changes: 5 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Tests

on: [push, pull_request]
on: [pull_request]

jobs:
tests:
name: Run TS Project eslint
name: Run TS Project Tests
runs-on: ubuntu-latest

steps:
Expand All @@ -17,10 +17,7 @@ jobs:
node-version: 12

- name: Install Node.js dependencies
run: npm install
run: npm ci

- name: Run unit tests
uses: actions/checkout@v2
run: npm run unit-tests
with:
github_token: ${{ secrets.github_token }}
- name: Run test
run: npm run tests
2 changes: 1 addition & 1 deletion tests/unit/apiv6.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('apiv6', function () {
it('should return error', async function () {
const apiv6 = new Apiv6(baseUrl, 'not-registerd', '123456');

nock(baseUrl).put(createChangesetEndPoint).reply(401, "Couldn't authenticate you");
nock(baseUrl).put(createChangesetEndPoint).reply(401, 'Couldn\'t authenticate you');

const xmlData = createChangesetXml("test-generator", "test-user");

Expand Down

0 comments on commit e6ca108

Please sign in to comment.