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 1b1b7c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
8 changes: 4 additions & 4 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,14 +16,14 @@ jobs:
with:
node-version: 12

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

- name: Run TS Project linters
uses: wearerequired/lint-action@v1
with:
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 tests
run: npm run test
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 1b1b7c9

Please sign in to comment.