-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into mhofman/5542-export-state-sync
- Loading branch information
Showing
224 changed files
with
2,400 additions
and
1,052 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Post Test Functions | ||
description: 'Runs test uploading and coverage uploading' | ||
|
||
inputs: | ||
codecov-token: | ||
description: 'token for codecov' | ||
required: false | ||
default: '' | ||
datadog-token: | ||
description: 'token for datadog' | ||
required: false | ||
default: '' | ||
datadog-site: | ||
description: 'site for datadog' | ||
required: false | ||
default: 'us3.datadoghq.com' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: upload tests | ||
shell: bash | ||
if: ${{ github.repository_owner == 'agoric' }} && (success() || failure()) | ||
env: | ||
DD_ENV: ci | ||
DATADOG_SITE: ${{ inputs.datadog-site }} | ||
run: | | ||
./scripts/ci-collect-testruns.sh | ||
if [ "${{ inputs.datadog-token }}" != "" ]; then | ||
export DATADOG_API_KEY="${{ inputs.datadog-token }}" | ||
export DD_ENV="ci" | ||
export DD_SITE="${{ inputs.datadog-site }}" | ||
npx @datadog/datadog-ci junit upload --service agoric-sdk ./packages/*/junit.xml | ||
fi | ||
- name: upload coverage prepare | ||
shell: bash | ||
id: coverage-prep | ||
if: ${{ github.repository_owner == 'agoric' }} && (success() || failure()) | ||
run: | | ||
if [ "${{ inputs.codecov-token }}" != "" ]; then | ||
# delete v8 coverage jsons to reduce noise | ||
find . -name "coverage*.json" -delete | ||
echo "skip=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "skip=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Upload coverage reports to Codecov | ||
if: ${{ github.repository_owner == 'agoric' }} && ${{ steps.coverage-prep.outputs.skip == 'false' }} && (success() || failure()) | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ inputs.codecov-token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
on: | ||
schedule: | ||
- cron: '0 8 * * *' | ||
workflow_dispatch: | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OWNER: ${{ github.repository_owner }} | ||
REPO: ${{ github.event.repository.name }} | ||
|
||
jobs: | ||
find_stale_prs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- shell: bash | ||
run: | | ||
stale_prs=$(gh pr list -R "$OWNER/$REPO" --json url,updatedAt,title,state,number,mergeable,labels,id,createdAt,author -L 1000 -s open -q '.|sort_by(.author.login)|.[]|(now - (.updatedAt|fromdate)) as $u|select(.state=="OPEN" and (.labels[].name|contains("merge")) and $u>86400)|{url:.url, author: .author.login, title: .title, updated: .updatedAt, u: $u, number: .number}' | jq -c .) | ||
if [[ "$stale_prs" != "" ]]; then | ||
while IFS= read -r line; do | ||
echo "Stale PR: $line" | ||
prNum=$(echo "$line" | jq -r .number) | ||
prOpener=$(echo "$line" | jq -r .author) | ||
gh pr comment -R "$OWNER/$REPO" $prNum -b "@${prOpener} - This PR appears to be stuck. It's had a merge label for > 24 hours" | ||
done <<< "$stale_prs" | ||
echo "detected stale PRs" | ||
exit 1 | ||
else | ||
echo "no stale PRs detected" | ||
exit 0 | ||
fi | ||
- name: notify on failure | ||
if: failure() | ||
uses: ./.github/actions/notify-status | ||
with: | ||
webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
from: ${{ secrets.NOTIFY_EMAIL_FROM }} | ||
to: ${{ secrets.NOTIFY_EMAIL_TO }} | ||
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.