deps: bump the all-dependencies group across 1 directory with 15 updates #546
Workflow file for this run
This file contains hidden or 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: Test CN-Quickstart Integration | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| test-cn-quickstart: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| - name: Compute Submodule Cache Key | |
| id: submodule-cache-key | |
| run: | | |
| set -euo pipefail | |
| # Works even when submodules are not initialized: uses gitlinks recorded in this repo. | |
| key="$(git submodule status --recursive | tr -s ' ' | cut -d' ' -f1-2 | sha256sum | cut -d' ' -f1)" | |
| echo "value=$key" >> $GITHUB_OUTPUT | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| with: | |
| cache-read-only: false | |
| - name: Initialize Submodules | |
| run: | | |
| set -euo pipefail | |
| init_submodule() { | |
| local path="$1" | |
| shift | |
| if git submodule update --init "$@" "$path"; then | |
| return | |
| fi | |
| # If a previous run left an incomplete checkout around, retry from a clean directory. | |
| echo "Submodule init failed for $path, retrying with clean checkout..." | |
| rm -rf "$path" | |
| git submodule update --init "$@" "$path" | |
| } | |
| init_submodule libs/splice --depth 1 | |
| init_submodule libs/cn-quickstart --recursive | |
| - name: Restore Quickstart Preparation Cache | |
| id: quickstart-prep-cache-restore | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/node_modules | |
| ${{ github.workspace }}/artifacts | |
| ${{ github.workspace }}/build | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.env.local | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.gradle | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.daml | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.config | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.cache | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/frontend/node_modules | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/frontend/dist | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/backend/build | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/integration-test/node_modules | |
| /home/runner/.daml | |
| /home/runner/.gradle | |
| key: quickstart-prep-${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json') }}-${{ steps.submodule-cache-key.outputs.value }} | |
| - name: Verify Cached Prerequisites | |
| id: verify-cache | |
| run: | | |
| set -euo pipefail | |
| if [ -d "node_modules" ]; then | |
| echo "has_node_modules=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_node_modules=false" >> $GITHUB_OUTPUT | |
| fi | |
| if [ -f "libs/cn-quickstart/quickstart/.env.local" ]; then | |
| echo "has_quickstart_env=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_quickstart_env=false" >> $GITHUB_OUTPUT | |
| fi | |
| if [ -x "$HOME/.daml/bin/daml" ]; then | |
| echo "has_daml=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_daml=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Install Dependencies | |
| if: steps.verify-cache.outputs.has_node_modules != 'true' | |
| run: npm install | |
| - name: Setup CN-Quickstart | |
| if: steps.verify-cache.outputs.has_quickstart_env != 'true' | |
| run: | | |
| cd libs/cn-quickstart/quickstart | |
| echo "Running setup with OAuth2..." | |
| # Setup with OAuth2 non-interactively | |
| echo "2" | make setup || true # Select option 2 (with OAuth2) | |
| echo "✓ CN-Quickstart setup complete" | |
| timeout-minutes: 15 | |
| - name: Install Daml SDK | |
| if: steps.verify-cache.outputs.has_daml != 'true' | |
| run: | | |
| cd libs/cn-quickstart/quickstart | |
| # Retry logic for transient Maven Central 403 errors | |
| max_attempts=5 | |
| attempt=1 | |
| while [ $attempt -le $max_attempts ]; do | |
| echo "Attempt $attempt of $max_attempts: Installing Daml SDK..." | |
| if make install-daml-sdk; then | |
| echo "✓ Daml SDK installed successfully" | |
| exit 0 | |
| fi | |
| echo "Attempt $attempt failed" | |
| if [ $attempt -lt $max_attempts ]; then | |
| sleep_time=$((30 * attempt)) | |
| echo "Waiting ${sleep_time}s before retry..." | |
| sleep $sleep_time | |
| fi | |
| attempt=$((attempt + 1)) | |
| done | |
| echo "All $max_attempts attempts failed" | |
| exit 1 | |
| timeout-minutes: 15 | |
| - name: Add Daml CLI to PATH | |
| run: echo "$HOME/.daml/bin" >> $GITHUB_PATH | |
| - name: Start CN-Quickstart | |
| run: | | |
| CANTON_LOCALNET_FAST_START=true bash ./scripts/localnet/localnet-cloud.sh start | |
| echo "✓ CN-Quickstart started" | |
| timeout-minutes: 15 | |
| # Cache the prepared quickstart environment to speed up subsequent runs. | |
| # This cache will be invalidated when: | |
| # - package.json changes (dependency additions/removals) | |
| # - package-lock.json changes (exact dependency versions) | |
| # - libs/cn-quickstart submodule HEAD changes (submodule updated to different commit) | |
| # - libs/splice submodule HEAD changes (submodule updated to different commit) | |
| # - Runner OS changes (unlikely in practice) | |
| - name: Save Quickstart Preparation Cache | |
| if: steps.quickstart-prep-cache-restore.outputs.cache-hit != 'true' | |
| id: quickstart-prep-cache-save | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/node_modules | |
| ${{ github.workspace }}/artifacts | |
| ${{ github.workspace }}/build | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.env.local | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.gradle | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.daml | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.config | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/.cache | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/frontend/node_modules | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/frontend/dist | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/backend/build | |
| ${{ github.workspace }}/libs/cn-quickstart/quickstart/integration-test/node_modules | |
| /home/runner/.daml | |
| /home/runner/.gradle | |
| key: ${{ steps.quickstart-prep-cache-restore.outputs.cache-primary-key }} | |
| - name: Build SDK | |
| run: npm run build | |
| - name: Run LocalNet Smoke + Integration Tests | |
| run: | | |
| echo "Running tests..." | |
| npm run localnet:smoke | |
| npm run test:integration | |
| echo "✓ Tests passed!" | |
| - name: Show Logs on Failure | |
| if: failure() | |
| run: | | |
| echo "==================== Docker Containers ====================" | |
| docker ps -a || true | |
| echo "==================== Docker Compose Logs ====================" | |
| if [ -d "libs/cn-quickstart/quickstart" ]; then | |
| cd libs/cn-quickstart/quickstart | |
| docker compose logs --tail=100 || true | |
| fi | |
| echo "==================== Canton Logs ====================" | |
| if [ -f libs/cn-quickstart/quickstart/logs/canton.log ]; then | |
| tail -100 libs/cn-quickstart/quickstart/logs/canton.log | |
| fi |