diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b191039..a6ee80f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint -on: [push, pull_request] +on: [pull_request] jobs: eslint: @@ -16,8 +16,8 @@ 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 @@ -25,5 +25,5 @@ jobs: github_token: ${{ secrets.github_token }} # Enable linters eslint: true - eslint_dir: ./src + eslint_dir: ./src/**/*.ts tests/**/*.ts eslint_extensions: ts \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bb34e1b..3f0610b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: @@ -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 \ No newline at end of file diff --git a/tests/unit/apiv6.test.ts b/tests/unit/apiv6.test.ts index 3080167..e3208ac 100644 --- a/tests/unit/apiv6.test.ts +++ b/tests/unit/apiv6.test.ts @@ -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");