Files
self/.github/workflows/contracts.yml
Seshanth.S c5e3b03e42 Stitch tunnel flow screens with proving machine and recovery (#1896)
* stitch tunnelflow screens

* save wip formatting

* add failure flow

* stub account recovery

* add tests

* add spec wv-17

* prep for review

* serialize

* fixes

* fix bug

* fix dev building

* fix: close Didit modal on completion, show KycPendingScreen while waiting (#1900)

- Close Didit SDK modal immediately when onComplete fires
- Show Euclid KycPendingScreen with animation while Socket.IO waits for TEE attestation
- Replaces generic spinner for the 'In Review' waiting state

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* navigate to disclose step on restore

* skip disclose confirmation screen

* Update Recovery flow

* Navigate to account recovery if TEE rejects it as already registered

* Navigate to disclose directly if the selected document is registered

* SELF-2348: Load webapp from url

* update sdk-test-app

* fix result from sdk

* fixes?

* fix build issue

* fix install pipeline

* carry pr feedback. fix formatting

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Nesopie <87437291+Nesopie@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 14:14:52 -07:00

99 lines
3.4 KiB
YAML

name: Contracts CI
on:
pull_request:
branches:
- dev
- staging
- main
env:
GH_HARDHAT_CACHE_VERSION: v1
concurrency:
group: contracts-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_changes:
runs-on: ubuntu-slim
outputs:
should_run: ${{ steps.filter.outputs.should_run }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check if should run
id: filter
run: |
set -e
if [[ "${{ github.base_ref }}" == "main" ]] || [[ "${{ github.base_ref }}" == "staging" ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "Running for ${{ github.base_ref }} - no path filter"
else
# For dev branch, check if contracts or common files changed
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) || {
echo "Error: Failed to diff against base branch"
exit 1
}
if echo "$CHANGED_FILES" | grep -qE "^(contracts|common)/"; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "Running for dev - contracts or common files changed"
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Skipping for dev - no contracts or common files changed"
fi
fi
test_contracts:
needs: check_changes
if: github.event.pull_request.draft == false && needs.check_changes.outputs.should_run == 'true'
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v6
- name: Read and sanitize Node.js version
shell: bash
run: |
if [ ! -f .nvmrc ] || [ -z "$(cat .nvmrc)" ]; then
echo "❌ .nvmrc is missing or empty"; exit 1;
fi
VERSION="$(tr -d '\r\n' < .nvmrc)"
VERSION="${VERSION#v}"
if ! [[ "$VERSION" =~ ^[0-9]+(\.[0-9]+){0,2}$ ]]; then
echo "Invalid .nvmrc content: '$VERSION'"; exit 1;
fi
echo "NODE_VERSION=$VERSION" >> "$GITHUB_ENV"
echo "NODE_VERSION_SANITIZED=${VERSION//\//-}" >> "$GITHUB_ENV"
- name: Set Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
uses: ./.github/actions/yarn-install
- name: Cache Hardhat compilers
uses: actions/cache@v4
with:
path: ~/.cache/hardhat-nodejs/compilers-v2
key: ${{ runner.os }}-hardhat-compilers-${{ env.GH_HARDHAT_CACHE_VERSION }}-${{ hashFiles('contracts/hardhat.config.ts', 'contracts/package.json', 'yarn.lock') }}
restore-keys: |
${{ runner.os }}-hardhat-compilers-${{ env.GH_HARDHAT_CACHE_VERSION }}-
- name: Prettier Check - Code Formatting
run: yarn prettier:check
working-directory: ./contracts
- name: Build Common Dependencies
run: yarn workspace @selfxyz/common build
- name: Build Contracts
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 15
command: yarn build
working_directory: ./contracts
- name: Run Tests (Contracts)
working-directory: ./contracts
# skip until they get fixed
if: false
run: yarn test