diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 44bc461..9f6e542 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -30,8 +30,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: npm install - run: npm install + - run: npm install - name: Run test suite run: npm run test diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 0cf92f9..0ac61f8 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -3,6 +3,9 @@ on: [ pull_request ] name: Coverage +env: + CI: true + jobs: coverage: @@ -21,11 +24,15 @@ jobs: with: node-version: 14 - - name: install, run + - name: npm install run: | npm install npm install --no-save nyc codecov - npm run cover + + - name: run coverage + run: npx nyc --reporter=lcovonly npm run test + env: + NODE_ENV: cov - name: Coveralls uses: coverallsapp/github-action@master diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3a85a8c..4fcf698 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,6 +3,9 @@ name: Lint on: [ push ] +env: + CI: true + jobs: lint: @@ -24,11 +27,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: npm install - run: npm install + - run: npm install - - name: Lint using eslint + - name: Lint run: npm run lint - - env: - CI: true \ No newline at end of file diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index a905de7..411518e 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -7,6 +7,7 @@ on: - master env: + CI: true node_version: 14 jobs: @@ -26,10 +27,9 @@ jobs: node-version: ${{ env.node_version }} registry-url: https://registry.npmjs.org/ - - name: npm install - run: npm install + - run: npm install - - name: Run test suite + - name: Run tests run: npm run test - name: publish to NPM @@ -40,3 +40,13 @@ jobs: - name: GitHub Release uses: justincy/github-action-npm-release@2.0.1 id: release + + - name: Coverage Run + run: | + npm install --no-save nyc codecov + npx nyc --reporter=lcovonly npm run test + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} diff --git a/package.json b/package.json index 1e8f14c..441fe2a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "DNS Zone Validator", "main": "index.js", "scripts": { - "cover": "NODE_ENV=cov npx nyc --reporter=lcovonly npm run test", "grammar": "npx -p nearley nearleyc src/bind-grammar.ne -o lib/grammar.js", "lint": "npx eslint index.js test/*.js", "lintfix": "npx eslint --fix index.js test/*.js",