fix: handle Node 18 breaking change #27833
Workflow file for this run
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
name: Integration tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- 'release-*' | |
- beta | |
tags: | |
- '@agoric/sdk@*' | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
- labeled | |
- auto_merge_enabled | |
merge_group: | |
jobs: | |
pre_check: | |
uses: ./.github/workflows/pre-check-integration.yml | |
# This job is meant to emulate what developers working with the Agoric platform will experience | |
# It should be kept in sync with https://agoric.com/documentation/getting-started/ | |
getting-started: | |
needs: pre_check | |
if: needs.pre_check.outputs.should_run == 'true' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
cli: [link-cli/yarn, registry/yarn, registry/npm, registry/npx] | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Reconfigure git to use HTTP authentication | |
run: git config --global url."https://github.com/".insteadOf ssh://git@github.com/ | |
shell: bash | |
# Prerequisites | |
- uses: ./.github/actions/restore-node | |
with: | |
node-version: 16.x | |
keep-endo: 'true' | |
# Select a branch on dapp to test against by adding text to the body of the | |
# pull request. For example: #dapp-encouragement-branch: zoe-release-0.7.0 | |
# The default is 'main' | |
- name: Get the appropriate dapp branch | |
id: get-branch | |
uses: actions/github-script@v6 | |
with: | |
result-encoding: string | |
script: | | |
let branch = 'main'; | |
if (context.payload.pull_request) { | |
const { body } = context.payload.pull_request; | |
const regex = /^\#getting-started-branch:\s+(\S+)/m; | |
const result = regex.exec(body); | |
if (result) { | |
branch = result[1]; | |
} | |
} | |
console.log(branch); | |
return branch; | |
- name: Start local NPM registry | |
if: ${{ startsWith(matrix.cli, 'registry') }} | |
run: | | |
set -xe | |
git reset --hard HEAD | |
git config user.email "noreply@agoric.com" | |
REGISTRY_PUBLISH_WORKSPACES="$HOME/endo" scripts/registry.sh bg-publish ${{ matrix.cli }} | |
- name: run agoric-cli integration-test | |
run: scripts/registry.sh test ${{ matrix.cli }} ${{steps.get-branch.outputs.result}} | |
- name: notify on failure | |
if: > | |
failure() && github.event_name != 'pull_request' && | |
github.repository_owner == 'agoric' | |
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 }} |