-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add txt record extract util, update logger for latest server-analytics changes * lint * update decoder fn * update analytics library, and typing * update action config * update actions module * test on node 21 * upload logs as artifacts on failure * update artifact uploader version * remove node 20 due to hardhat incompatibility
- Loading branch information
1 parent
c0f0aaa
commit 7f71305
Showing
7 changed files
with
613 additions
and
458 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node: ['16.7.x', '18.15.x'] | ||
node: ['18.x'] | ||
os: [ubuntu-latest, macOS-latest] | ||
|
||
steps: | ||
|
@@ -38,26 +38,50 @@ jobs: | |
path: './contracts' | ||
ref: '6b9aaae963f71792ab1a75de61d5151ff1d1b7e3' | ||
|
||
# - name: Run local node on Windows | ||
# if: runner.os == 'Windows' | ||
# run: cd contracts; yarn --network-timeout 100000; $env:HARDHAT_DISABLE_TELEMETRY_PROMPT = "true"; $currentDir = (Get-Location).Path; $job = Start-Job -ScriptBlock { param($dir) Set-Location -Path $dir; npx hardhat node --hostname '127.0.0.1' } -ArgumentList $currentDir; Start-Sleep -Seconds 50; Receive-Job -Job $job -Keep | ||
# env: | ||
# BATCH_GATEWAY_URLS: '["https://universal-offchain-unwrapper.ens-cf.workers.dev/"]' | ||
# DOH_GATEWAY_URL: 'https://cloudflare-dns.com/dns-query' | ||
|
||
- name: Run local node on Unix | ||
if: runner.os != 'Windows' | ||
run: cd ./contracts && yarn && npx hardhat node --hostname 127.0.0.1 & | ||
- name: Run local node | ||
run: | | ||
cd ./contracts | ||
yarn | ||
npx hardhat node --hostname 127.0.0.1 > hardhat_output.log 2>&1 & | ||
echo $! > hardhat_pid.txt | ||
env: | ||
BATCH_GATEWAY_URLS: '["https://universal-offchain-unwrapper.ens-cf.workers.dev/"]' | ||
DOH_GATEWAY_URL: 'https://cloudflare-dns.com/dns-query' | ||
|
||
- name: Wait for local node | ||
uses: iFaxity/[email protected] | ||
with: | ||
timeout: 900000 | ||
window: 2000 | ||
resource: http://127.0.0.1:8545 | ||
run: | | ||
timeout=300 | ||
while true; do | ||
if [ $timeout -le 0 ]; then | ||
echo "Timeout waiting for Hardhat node" | ||
cat hardhat_output.log | ||
exit 1 | ||
fi | ||
if nc -z localhost 8545 2>/dev/null; then | ||
echo "Hardhat node is up and running" | ||
break | ||
fi | ||
echo "Waiting for Hardhat node... ($timeout seconds left)" | ||
sleep 5 | ||
timeout=$((timeout - 5)) | ||
done | ||
shell: bash | ||
|
||
- name: Test | ||
run: yarn test --ci --coverage --maxWorkers=2 | ||
|
||
- name: Upload Hardhat logs on failure | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: hardhat-logs | ||
path: ./contracts/hardhat_output.log | ||
|
||
- name: Cleanup Hardhat process | ||
if: always() | ||
run: | | ||
if [ -f ./contracts/hardhat_pid.txt ]; then | ||
pid=$(cat ./contracts/hardhat_pid.txt) | ||
kill $pid 2>/dev/null || true | ||
fi | ||
shell: bash |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.DS_Store | ||
.dev.vars | ||
.env | ||
.wrangler | ||
node_modules | ||
coverage | ||
dist |
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
Oops, something went wrong.