Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jun 27, 2021
1 parent bbc0c4e commit 96e1ab8
Show file tree
Hide file tree
Showing 27 changed files with 992 additions and 320 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/close_pull_requests.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -32,3 +53,17 @@ jobs:
steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
cancel:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/[email protected]
with:
workflow_id: >-
benchmark.yml,
examples.yml,
test.yml,
test_coverage.yml,
test_install.yml,
publish.yml
access_token: ${{ github.token }}
35 changes: 31 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 }}
Expand Down
43 changes: 39 additions & 4 deletions .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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()
28 changes: 26 additions & 2 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 }}
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand All @@ -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 ?= \
Expand Down
Loading

0 comments on commit 96e1ab8

Please sign in to comment.