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 Nov 24, 2024
1 parent e1641aa commit af33e49
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 7 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/test_published_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
#/
# @license Apache-2.0
#
# Copyright (c) 2024 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_published_package

# Workflow triggers:
on:
# Run workflow on a weekly schedule:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '55 7 * * 6'

# Run workflow upon completion of `publish` workflow run:
workflow_run:
workflows: ["publish"]
types: [completed]

# Allow workflow to be manually run:
workflow_dispatch:

# Workflow jobs:
jobs:
test-published:
# Define a display name:
name: 'Test running examples of published package'

# Define the type of virtual host machine:
runs-on: ubuntu-latest

# Define environment variables:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

# Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}

# Define the job's steps:
steps:
# Checkout the repository:
- name: 'Checkout repository'
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

# Install Node.js:
- name: 'Install Node.js'
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 20
timeout-minutes: 5

# Create test directory and run examples:
- name: 'Create test directory and run examples'
run: |
cd ..
mkdir test-published
cd test-published
# Copy example file:
cp $GITHUB_WORKSPACE/examples/index.js .
# Create a minimal package.json
echo '{
"name": "test-published",
"version": "1.0.0",
"main": "index.js",
"dependencies": {}
}' > package.json
# Get package name and modify example file:
PACKAGE_NAME=$(jq -r '.name' $GITHUB_WORKSPACE/package.json)
ESCAPED_PACKAGE_NAME=$(echo "$PACKAGE_NAME" | sed 's/[\/&]/\\&/g')
sed -i "s/require( '.\/..\/lib' )/require( '$ESCAPED_PACKAGE_NAME' )/g" index.js
# Extract and install dependencies:
DEPS=$(grep -oP "require\(\s*'([^']+)'\s*\)" index.js | sed "s/require(\s*'//" | sed "s/'\s*)//" | grep -v "^\.")
for dep in $DEPS; do
npm install $dep --save
done
# Run the example:
node index.js
# Send Slack notification if job fails:
- name: 'Send notification to Slack in case of failure'
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
channel: '#npm-ci'
if: failure()
83 changes: 79 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<section class="release" id="unreleased">

## Unreleased (2024-11-17)
## Unreleased (2024-11-24)

<section class="packages">

Expand Down Expand Up @@ -82,6 +82,78 @@ This release closes the following issue:

<!-- /.package -->

<section class="package" id="stats-base-scumax-unreleased">

#### [@stdlib/stats/base/scumax](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/scumax)

<details>

<section class="issues">

##### Closed Issues

A total of 3 issues were closed in this release:

[#3236](https://github.com/stdlib-js/stdlib/issues/3236), [#3237](https://github.com/stdlib-js/stdlib/issues/3237), [#3238](https://github.com/stdlib-js/stdlib/issues/3238)

</section>

<!-- /.issues -->

</details>

</section>

<!-- /.package -->

<section class="package" id="stats-base-snanmax-unreleased">

#### [@stdlib/stats/base/snanmax](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/snanmax)

<details>

<section class="issues">

##### Closed Issues

A total of 3 issues were closed in this release:

[#3236](https://github.com/stdlib-js/stdlib/issues/3236), [#3237](https://github.com/stdlib-js/stdlib/issues/3237), [#3238](https://github.com/stdlib-js/stdlib/issues/3238)

</section>

<!-- /.issues -->

</details>

</section>

<!-- /.package -->

<section class="package" id="stats-base-sstdevch-unreleased">

#### [@stdlib/stats/base/sstdevch](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/sstdevch)

<details>

<section class="issues">

##### Closed Issues

A total of 3 issues were closed in this release:

[#3236](https://github.com/stdlib-js/stdlib/issues/3236), [#3237](https://github.com/stdlib-js/stdlib/issues/3237), [#3238](https://github.com/stdlib-js/stdlib/issues/3238)

</section>

<!-- /.issues -->

</details>

</section>

<!-- /.package -->

</section>

<!-- /.packages -->
Expand All @@ -90,9 +162,9 @@ This release closes the following issue:

### Closed Issues

A total of 3 issues were closed in this release:
A total of 6 issues were closed in this release:

[#1619](https://github.com/stdlib-js/stdlib/issues/1619), [#1632](https://github.com/stdlib-js/stdlib/issues/1632), [#1633](https://github.com/stdlib-js/stdlib/issues/1633)
[#1619](https://github.com/stdlib-js/stdlib/issues/1619), [#1632](https://github.com/stdlib-js/stdlib/issues/1632), [#1633](https://github.com/stdlib-js/stdlib/issues/1633), [#3236](https://github.com/stdlib-js/stdlib/issues/3236), [#3237](https://github.com/stdlib-js/stdlib/issues/3237), [#3238](https://github.com/stdlib-js/stdlib/issues/3238)

</section>

Expand All @@ -102,9 +174,11 @@ A total of 3 issues were closed in this release:

### Contributors

A total of 4 people contributed to this release. Thank you to the following contributors:
A total of 6 people contributed to this release. Thank you to the following contributors:

- Athan Reines
- Kohantika Nath
- Neeraj Pathak
- Philipp Burckhardt
- Pratyush Kumar Chouhan
- Ruthwik Chikoti
Expand All @@ -119,6 +193,7 @@ A total of 4 people contributed to this release. Thank you to the following cont

<details>

- [`f8dc5fc`](https://github.com/stdlib-js/stdlib/commit/f8dc5fce6476df26e8703b8af8028dfd1477a515) - **docs:** fix C lint errors [(#3249)](https://github.com/stdlib-js/stdlib/pull/3249) _(by Neeraj Pathak, Athan Reines)_
- [`28bdda3`](https://github.com/stdlib-js/stdlib/commit/28bdda3affa89470bbdf531cb3bbc233c85d3d17) - **docs:** improve examples of `stats/base/dists/chisquare` namespace [(#2678)](https://github.com/stdlib-js/stdlib/pull/2678) _(by Kohantika Nath, Philipp Burckhardt)_
- [`4e1c68b`](https://github.com/stdlib-js/stdlib/commit/4e1c68b10906fea989b1a785405eb17d68553461) - **docs:** improve examples of `stats/base/dists/kumaraswamy` [(#2605)](https://github.com/stdlib-js/stdlib/pull/2605) _(by Ruthwik Chikoti, Philipp Burckhardt)_
- [`19c8688`](https://github.com/stdlib-js/stdlib/commit/19c868816d201337c4cb77683c2ff0a306b81e95) - **docs:** improve README examples of `stats/base/dists/laplace` namespace [(#1875)](https://github.com/stdlib-js/stdlib/pull/1875) _(by Pratyush Kumar Chouhan, Philipp Burckhardt)_
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ Roman Stetsyk <[email protected]>
Rutam <[email protected]>
Ruthwik Chikoti <[email protected]>
Ryan Seal <[email protected]>
Rylan Yang <[email protected]>
Sai Srikar Dumpeti <[email protected]>
SarthakPaandey <[email protected]>
Saurabh Singh <[email protected]>
Seyyed Parsa Neshaei <[email protected]>
Shashank Shekhar Singh <[email protected]>
Shivam <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion base/scumax/examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

int main( void ) {
// Create strided arrays:
float x[] = { 1.0, 2.0, -3.0, 4.0, -5.0, 6.0, 7.0, 8.0 };
const float x[] = { 1.0f, 2.0f, -3.0f, 4.0f, -5.0f, 6.0f, 7.0f, 8.0f };
float y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };

// Specify the number of elements:
Expand Down
2 changes: 1 addition & 1 deletion base/snanmax/examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

int main( void ) {
// Create a strided array:
float x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 0.0/0.0, 0.0/0.0 };
const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 0.0f/0.0f, 0.0f/0.0f };

// Specify the number of elements:
int64_t N = 5;
Expand Down
2 changes: 1 addition & 1 deletion base/sstdevch/examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

int main( void ) {
// Create a strided array:
float x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };

// Specify the number of elements:
int64_t N = 4;
Expand Down

0 comments on commit af33e49

Please sign in to comment.