Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stdlib - OSS Development",
"image": "mcr.microsoft.com/devcontainers/universal:2",
"image": "mcr.microsoft.com/devcontainers/javascript-node",
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {},
"ghcr.io/julialang/devcontainer-features/julia:1": {},
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/post-create
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ make init
sudo apt-get update
sudo apt-get install -y gfortran

make install-deps-r
#make install-deps-r
26 changes: 0 additions & 26 deletions .github/workflows/check_contributing_guidelines_acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,6 @@
# Workflow name:
name: check_contributing_guidelines_acceptance

# Workflow triggers:
on:
# Allow the workflow to be triggered by other workflows
workflow_call:
# Define the input parameters for the workflow:
inputs:
pull_request_number:
description: 'Pull request number'
required: true
type: number
user:
required: true
type: string
# Define the secrets accessible by the workflow:
secrets:
STDLIB_BOT_GITHUB_TOKEN:
description: 'stdlib-bot GitHub token to create pull request comments'
required: true

# Trigger on pull request events:
pull_request_target:
types:
- opened
- reopened
- edited

# Global permissions:
permissions:
# Allow read-only access to the repository contents:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/first_time_greeting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# Workflow name:
name: first_time_greeting

# Workflow triggers:
on: [pull_request_target, issues]

# Global permissions:
permissions:
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,6 @@
# Workflow name:
name: labeler

# Workflow triggers:
on:
pull_request_target:
types:
- opened
- closed
- synchronize
- reopened
- edited
- review_requested
- review_request_removed
- ready_for_review
- converted_to_draft
- labeled

# Workflow jobs:
jobs:

Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/lint_pr_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
# Workflow name:
name: lint_pr_title

# Workflow triggers:
on:
pull_request:
types:
- synchronize
- opened
- reopened
- edited

# Global permissions:
permissions:
Expand Down
134 changes: 0 additions & 134 deletions .github/workflows/run_tests_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,137 +247,3 @@ jobs:
report="## Coverage Report\n\n${table}\n\n${compare_txt}"
fi
echo "report=$report" >> $GITHUB_OUTPUT

# Post report as comment to PR:
- name: 'Post report as comment to PR'
if: github.event_name == 'pull_request_target' && steps.check-changed.outputs.skip == 'false'
# Pin action to full length commit SHA
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
script: |
const { data: comments } = await github.rest.issues.listComments({
'issue_number': context.issue.number,
'owner': context.repo.owner,
'repo': context.repo.repo,
});

const botComment = comments.find( comment => comment.user.login === 'stdlib-bot' && comment.body.includes( '## Coverage Report' ) );
if ( botComment ) {
await github.rest.issues.updateComment({
'owner': context.repo.owner,
'repo': context.repo.repo,
'comment_id': botComment.id,
'body': `${{ steps.create-report.outputs.report }}`
});
} else {
await github.rest.issues.createComment({
'issue_number': context.issue.number,
'owner': context.repo.owner,
'repo': context.repo.repo,
'body': `${{ steps.create-report.outputs.report }}`
});
}

# Post report as comment to commit:
- name: 'Post report as comment to commit'
if: github.event_name == 'push' && steps.check-changed.outputs.skip == 'false'
# Pin action to full length commit SHA
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
script: |
github.rest.repos.createCommitComment({
'commit_sha': context.sha,
'owner': context.repo.owner,
'repo': context.repo.repo,
'body': '${{ steps.create-report.outputs.report }}'
})

# Checkout coverage repository:
- name: 'Checkout coverage repository'
if: steps.check-changed.outputs.skip == 'false'
# Pin action to full length commit SHA
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Code coverage repository:
repository: 'stdlib-js/www-test-code-coverage'

# File path to checkout to:
path: './www-test-code-coverage'

# Specify whether to remove untracked files before checking out the repository:
clean: false

# Limit clone depth to the most recent commit:
fetch-depth: 1

# Token for accessing the repository:
token: ${{ secrets.STDLIB_BOT_FGPAT_REPO_READ }}

# Avoid storing GitHub token in local Git configuration:
persist-credentials: false

# Checkout coverage repository branch:
- name: 'Checkout coverage repository branch'
if: steps.check-changed.outputs.skip == 'false'
run: |
cd ./www-test-code-coverage

if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
BRANCH_NAME="pr-${{ github.event.pull_request.number }}"
git fetch origin $BRANCH_NAME || true
git checkout $BRANCH_NAME || git checkout -b $BRANCH_NAME

# Remove all directories except .github and .git from branch:
find . -mindepth 1 -maxdepth 1 -type d -not -name '.github' -not -name '.git' -exec git rm -rf {} +
else
BRANCH_NAME="main"
fi

# Copy artifacts to the repository:
- name: 'Copy artifacts to the repository'
if: steps.check-changed.outputs.skip == 'false'
run: |
if [ -d "./artifacts" ]; then
cp -R ./artifacts/* ./www-test-code-coverage

# Get commit SHA and timestamp:
commit_sha=$(git rev-parse HEAD)
commit_timestamp=$(git show -s --format=%ci $commit_sha)

# Append coverage to ndjson files:
files=$(find ./artifacts -name 'index.html')
for file in $files; do
file=${file//artifacts/www-test-code-coverage}
coverage=$(echo -n '['; grep -oP "(?<=class='fraction'>)[0-9]+/[0-9]+" $file | awk -F/ '{ if ($2 != 0) print $1 "," $2 "," ($1/$2)*100; else print $1 "," $2 ",100" }' | tr '\n' ',' | sed 's/,$//'; echo -n ",\"$commit_sha\",\"$commit_timestamp\"]")
echo $coverage >> $(dirname $file)/coverage.ndjson
done
else
echo "The artifacts directory does not exist."
fi

# Import GPG key to sign commits:
- name: 'Import GPG key to sign commits'
if: steps.check-changed.outputs.skip == 'false'
# Pin action to full length commit SHA
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
with:
gpg_private_key: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

# Commit and push changes:
- name: 'Commit and push changes'
if: steps.check-changed.outputs.skip == 'false'
env:
REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
USER_NAME: stdlib-bot
run: |
cd ./www-test-code-coverage
git config --local user.email "[email protected]"
git config --local user.name "stdlib-bot"
git add .
git commit -m "Update artifacts" || exit 0
git push "https://$USER_NAME:[email protected]/stdlib-js/www-test-code-coverage.git" $BRANCH_NAME
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,7 @@ jsconfig.json
# Cursor #
##########
.cursorignore

# Mentat #
##########
.mentat/
2 changes: 2 additions & 0 deletions .gitignore.update
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Mentat-specific files
.mentat/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ limitations under the License.

<section class="announcement">


</section>

<!-- /.announcement -->
Expand Down
Loading