diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e51e34e..dda052a 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -1,8 +1,29 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2021 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# Workflow name: name: benchmark +# Workflow triggers: on: workflow_dispatch: +# Workflow jobs: jobs: benchmark: runs-on: ubuntu-latest diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml index 0b341b6..11e0893 100644 --- a/.github/workflows/cancel.yml +++ b/.github/workflows/cancel.yml @@ -1,7 +1,29 @@ -name: Cancel Previous Runs +#/ +# @license Apache-2.0 +# +# Copyright (c) 2021 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ -on: push +# Workflow name: +name: Cancel Workflow Runs +# Workflow triggers: +on: + workflow_dispatch: + +# Workflow jobs: jobs: cancel: runs-on: ubuntu-latest diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml index 9f02696..9193004 100644 --- a/.github/workflows/close_pull_requests.yml +++ b/.github/workflows/close_pull_requests.yml @@ -1,9 +1,30 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2021 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# Workflow name: name: Close Pull Requests +# Workflow triggers: on: pull_request_target: types: [opened] +# Workflow jobs: jobs: run: runs-on: ubuntu-latest diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 0c19f10..6d226cb 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -1,8 +1,29 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2021 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# Workflow name: name: examples +# Workflow triggers: on: workflow_dispatch: +# Workflow jobs: jobs: examples: runs-on: ubuntu-latest diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ae05f51..ac43d57 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,28 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2021 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# Workflow name: name: Publish Package +# Workflow triggers: on: push +# Workflow jobs: jobs: publish: runs-on: ubuntu-latest @@ -32,3 +53,17 @@ jobs: steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() + cancel: + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - uses: styfle/cancel-workflow-action@0.9.0 + with: + workflow_id: >- + benchmark.yml, + examples.yml, + test.yml, + test_coverage.yml, + test_install.yml, + publish.yml + access_token: ${{ github.token }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3c99108..b24f0dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,29 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2021 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# Workflow name: name: build +# Workflow triggers: on: workflow_dispatch: +# Workflow jobs: jobs: test: runs-on: ubuntu-latest @@ -15,12 +36,18 @@ jobs: node-version: 15 - name: Install production and development dependencies id: install - run: | - npm install + uses: nick-invision/retry@v2 + with: + timeout_minutes: 2 + max_attempts: 3 + command: npm install - name: Run tests id: tests - run: | - npm test + uses: nick-invision/retry@v2 + with: + timeout_minutes: 3 + max_attempts: 2 + command: npm test - uses: act10ns/slack@v1 with: status: ${{ job.status }} diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index 0e8045d..0699d78 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -1,8 +1,29 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2021 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# Workflow name: name: coverage +# Workflow triggers: on: workflow_dispatch: +# Workflow jobs: jobs: test: runs-on: ubuntu-latest @@ -12,13 +33,27 @@ jobs: with: node-version: 15 - name: Install production and development dependencies - run: | - npm install + uses: nick-invision/retry@v2 + with: + timeout_minutes: 2 + max_attempts: 3 + command: npm install - name: Calculate test coverage - run: | - npm run test-cov + uses: nick-invision/retry@v2 + with: + timeout_minutes: 3 + max_attempts: 2 + command: npm run test-cov - name: Upload coverage to Codecov + id: upload uses: codecov/codecov-action@v1 with: directory: reports/coverage flags: unittests + fail_ci_if_error: true + - uses: act10ns/slack@v1 + with: + status: ${{ job.status }} + steps: ${{ toJson(steps) }} + channel: '#npm-ci' + if: failure() diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index ee70831..e79722e 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -1,10 +1,31 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2021 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# Workflow name: name: Test Installing Dependencies +# Workflow triggers: on: workflow_run: workflows: ["Publish Package"] types: [completed] +# Workflow jobs: jobs: on-success: runs-on: ubuntu-latest @@ -17,8 +38,11 @@ jobs: with: node-version: 15 - name: Install production dependencies via npm - run: | - npm install --only=prod + uses: nick-invision/retry@v2 + with: + timeout_minutes: 2 + max_attempts: 3 + command: npm install --only=prod - uses: act10ns/slack@v1 with: status: ${{ job.status }} diff --git a/Makefile b/Makefile index 6b4a628..f73f7ee 100644 --- a/Makefile +++ b/Makefile @@ -280,21 +280,21 @@ endif # Common exclude flags that most recipes for finding package files should use (Note: order does matter to some degree): FIND_COMMON_EXCLUDE_FLAGS ?= \ - -not -path "$(ROOT_DIR)/.*" \ - -not -path "$(NODE_MODULES)/*" \ - -not -path "$(BUILD_DIR)/*" \ - -not -path "$(REPORTS_DIR)/*" \ + '!' -path "$(ROOT_DIR)/.*" \ + '!' -path "$(NODE_MODULES)/*" \ + '!' -path "$(BUILD_DIR)/*" \ + '!' -path "$(REPORTS_DIR)/*" \ # Define exclusion flags to use when searching for benchmark files: FIND_BENCHMARKS_EXCLUDE_FLAGS ?= \ $(FIND_COMMON_EXCLUDE_FLAGS) \ - -not -path "$(ROOT_DIR)/**/$(BENCHMARKS_FIXTURES_FOLDER)/*" + '!' -path "$(ROOT_DIR)/**/$(BENCHMARKS_FIXTURES_FOLDER)/*" # Define flags for finding benchmark files: FIND_BENCHMARKS_FLAGS ?= \ -type f \ -name "$(BENCHMARKS_PATTERN)" \ - -path "$(ROOT_DIR)/**$(BENCHMARKS_FOLDER)/**" \ + \( -path "$(ROOT_DIR)/$(BENCHMARKS_FOLDER)/**" -o -path "$(ROOT_DIR)/**/$(BENCHMARKS_FOLDER)/**" \) \ -regex "$(BENCHMARKS_FILTER)" \ $(FIND_BENCHMARKS_EXCLUDE_FLAGS) @@ -308,13 +308,13 @@ FIND_BENCHMARKS_CMD ?= find $(find_kernel_prefix) $(ROOT_DIR) $(FIND_BENCHMARKS_ # Define exclusion flags to use when searching for examples files: FIND_EXAMPLES_EXCLUDE_FLAGS ?= \ $(FIND_COMMON_EXCLUDE_FLAGS) \ - -not -path "$(ROOT_DIR)/**/$(EXAMPLES_FIXTURES_FOLDER)/*" + '!' -path "$(ROOT_DIR)/**/$(EXAMPLES_FIXTURES_FOLDER)/*" # Define flags for finding examples files: FIND_EXAMPLES_FLAGS ?= \ -type f \ -name "$(EXAMPLES_PATTERN)" \ - -path "$(ROOT_DIR)/**$(EXAMPLES_FOLDER)/**" \ + \( -path "$(ROOT_DIR)/$(EXAMPLES_FOLDER)/**" -o -path "$(ROOT_DIR)/**/$(EXAMPLES_FOLDER)/**" \) \ -regex "$(EXAMPLES_FILTER)" \ $(FIND_EXAMPLES_EXCLUDE_FLAGS) @@ -328,7 +328,7 @@ FIND_EXAMPLES_CMD ?= find $(find_kernel_prefix) $(ROOT_DIR) $(FIND_EXAMPLES_FLAG # Define exclusion flags to use when searching for test files: FIND_TESTS_EXCLUDE_FLAGS ?= \ $(FIND_COMMON_EXCLUDE_FLAGS) \ - -not -path "$(ROOT_DIR)/**/$(TESTS_FIXTURES_FOLDER)/*" + '!' -path "$(ROOT_DIR)/**/$(TESTS_FIXTURES_FOLDER)/*" # Define flags for finding test files: FIND_TESTS_FLAGS ?= \ diff --git a/README.md b/README.md index 888d031..8cdf61b 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,10 @@ This package is part of [stdlib][stdlib], a standard library for JavaScript and For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. +#### Community + +[![Chat][chat-image]][chat-url] + --- ## License @@ -158,9 +162,12 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors]. [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/assert-is-uint32array/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/assert-is-uint32array?branch=main -[dependencies-image]: https://img.shields.io/david/stdlib-js/assert-is-uint32array +[dependencies-image]: https://img.shields.io/david/stdlib-js/assert-is-uint32array.svg [dependencies-url]: https://david-dm.org/stdlib-js/assert-is-uint32array/main +[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg +[chat-url]: https://gitter.im/stdlib-js/stdlib/ + [stdlib]: https://github.com/stdlib-js/stdlib [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors diff --git a/package.json b/package.json index bc1dfd4..927e8db 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "examples": "make examples", "benchmark": "make benchmark" }, - "homepage": "https://github.com/stdlib-js/stdlib", + "homepage": "https://stdlib.io", "repository": { "type": "git", "url": "git://github.com/stdlib-js/assert-is-uint32array.git"