diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 25d0d40..ddfa243 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,15 +1,29 @@ -name: Linting +env: {} -on: [push] +# FILE GENERATED WITH: npx ghat voxpelli/ghatemplates/lint +# SOURCE: https://github.com/voxpelli/ghatemplates +# OPTIONS: {"set":["jobs.test.strategy.matrix.node_version=[12]"]} +name: Linting +on: + - push + - pull_request jobs: - lint: - name: Static code analysis - runs-on: ubuntu-latest + test: + name: Node ${{ matrix.node_version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + node_version: + - 12 + os: + - ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - name: Use Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v2 with: - node-version: '12' - - run: npm install - - run: npx run-p check:* + node-version: ${{ matrix.node_version }} + - run: yarn install + - run: yarn run check diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index f9381a4..492d865 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,31 +1,46 @@ -name: Node CI +env: {} -on: [push] +# FILE GENERATED WITH: npx ghat voxpelli/ghatemplates/nodejs-coveralls +# SOURCE: https://github.com/voxpelli/ghatemplates +# OPTIONS: {"set":["jobs.test.strategy.matrix.node_version=[10,12,14,15]","jobs.test.strategy.matrix.os=[ubuntu-latest]"]} +name: Node CI +on: + - push + - pull_request jobs: test: name: Node ${{ matrix.node_version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: - node_version: [10, 12, 13] - os: [ubuntu-latest] - + node_version: + - 10 + - 12 + - 14 + - 15 + os: + - ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node_version }} + - run: yarn install + - run: yarn run test-ci + - name: Coveralls Parallel + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.github_token }} + flag-name: run-${{ matrix.os }}-${{ matrix.node_version }} + parallel: true + coverage: + needs: test + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node_version }} - - run: npm install - - run: npx run-s test:* - - name: Coveralls Parallel - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel: true - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true + - name: Coveralls Finished + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true diff --git a/package.json b/package.json index ab7bc6f..1267d2f 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,12 @@ "check:dependency-check": "dependency-check 'lib/**/*.js' 'test/**/*.js' --no-dev", "check:installed-check": "installed-check -i eslint -i installed-check", "check:lint": "eslint .", + "check": "run-p check:*", "start": "node .", + "sync-gh-actions": "ghat", "test:mocha": "NODE_ENV=test DOTENV_FILE=test/test.env nyc --reporter=lcov --reporter text mocha 'test/**/*.spec.js'", - "test": "run-p check:* && run-p test:*" + "test-ci": "run-s test:*", + "test": "run-s check test:*" }, "husky": { "hooks": { @@ -43,6 +46,7 @@ "eslint-plugin-node": "^11.0.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.0", + "ghat": "^0.14.0", "husky": "^4.3.8", "installed-check": "^4.0.0", "mocha": "^7.0.1", diff --git a/yarn.lock b/yarn.lock index 21d5134..30afc71 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1683,6 +1683,11 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +ghat@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/ghat/-/ghat-0.14.0.tgz#8aa456c7a0f61ba34d62fd27042cdd462a8dccbe" + integrity sha512-M5Pz4F+ncj4t5ioJVsco9jjtCwdyW0hsblyXtS0MXANrYo7N0sWoROoxV4ni2KEBH4o8+dKAhT2zsQHmfZDCtQ== + github-publish@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/github-publish/-/github-publish-3.0.0.tgz#eafde9743aeb0619f93d6a54eb2fb9fe174078d5"