diff --git a/.github/workflows/list-changed-files.yml b/.github/workflows/list-changed-files.yml index b90ddead..99791a9e 100644 --- a/.github/workflows/list-changed-files.yml +++ b/.github/workflows/list-changed-files.yml @@ -74,7 +74,6 @@ jobs: - rust/lit-node/** - .github/workflows/rust-lit-node-unit-tests.yml - .github/workflows/rust-lit-node-integration-tests.yml - - .github/workflows/rust-lit-node-version-upgrade-tests.yml - .github/workflows/rust-lit-node-fault-tests.yml - .github/workflows/rust-lit-node-long-running-tests.yml - .github/workflows/rust-lit-node-clippy.yml diff --git a/.github/workflows/rust-lit-node-group-unit-and-integration-tests.yml b/.github/workflows/rust-lit-node-group-unit-and-integration-tests.yml index 936e4747..92463be1 100644 --- a/.github/workflows/rust-lit-node-group-unit-and-integration-tests.yml +++ b/.github/workflows/rust-lit-node-group-unit-and-integration-tests.yml @@ -14,7 +14,6 @@ on: - .github/workflows/rust-lit-node-integration-tests.yml - .github/workflows/rust-lit-node-build.yml - .github/workflows/rust-lit-node-unit-tests.yml - - .github/workflows/rust-lit-node-version-upgrade-tests.yml - .github/workflows/rust-lit-node-group-unit-and-integration-tests.yml - scripts/github/** branches: @@ -164,124 +163,13 @@ jobs: working-directory: ${{github.workspace}}/rust/lit-node/shiva - name: Run acceptance, component and integration tests. run: "~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst --final-status-level pass --profile integration-tests -E 'test(/^acceptance|^component|^integration|^sdk/) - test(/long/)' --partition count:${{ matrix.partition }}/3 --nocapture --" - # after the standard build is done, run the upgrade tests - lit_node_version_upgrade_tests: - needs: build-if-needed - runs-on: warp-ubuntu-latest-x64-16x # change to LargeRunner to run on github. Change to self-hosted to run on our own runner. Change to buildjet-8vcpu-ubuntu-2204 to run on buildjet with 8 cpus - # TODO: enable this when you want to turn on version upgrade tests. there's also another spot below where you have to remove a hardcoded "false" with a comment like this. - if: ${{ inputs.enable_version_upgrade_tests }} - timeout-minutes: 60 - strategy: - matrix: - partition: [1, 2, 3] - - services: - anvil: - image: litptcl/anvil-lit:latest - ports: - - 8545:8545 - - 8549:8549 - credentials: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - steps: - - name: Install deps - working-directory: ${{ github.workspace }} - run: sudo apt-get update && sudo apt-get install -y zstd libudev-dev libsqlite3-dev cmake protobuf-compiler - - name: Checkout lit-assets - uses: actions/checkout@v6 - with: - fetch-depth: 0 - submodules: recursive - - name: Use Node.js - uses: WarpBuilds/setup-node@v4 - with: - node-version: 18.17.0 - cache: npm - cache-dependency-path: ${{ github.workspace }}/blockchain/contracts/package-lock.json - - name: Install dependencies for blockchain/contracts - working-directory: ${{ github.workspace }}/blockchain/contracts - run: npm install - - name: Run npx hardhat compile for blockchain/contracts - working-directory: ${{ github.workspace }}/blockchain/contracts - run: npx hardhat compile - - name: Install rust because the version upgrade tests do a recompile - uses: dtolnay/rust-toolchain@master - with: - toolchain: '1.91' # keep in sync with rust/lit-node/rust-toolchain.toml - components: rust-src - - name: Install nextest - run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C "${CARGO_HOME:-$HOME/.cargo}/bin" - - name: Download archive - uses: WarpBuilds/cache@v1 - with: - path: rust/lit-node/lit-node/nextest-archive.tar.zst - key: nextest-archive-${{ github.sha }}-lit-actions|testing - - name: Unzip archive so that we can get the lit_node binary - run: zstd -d -c nextest-archive.tar.zst | tar xf - - # Get the workflow run that has the latest build for target branches. - - name: Get the latest workflow run ID - id: get_latest_workflow_run_id - run: | - echo "LATEST_WORKFLOW_RUN_ID_HABANERO=$(cd scripts/ci_utils && cargo run --bin get_latest_workflow_run rust/lit-node-build-commit-hash 'origin/release-habanero-*')" >> "$GITHUB_OUTPUT" - echo "LATEST_WORKFLOW_RUN_ID_MANZANO=$(cd scripts/ci_utils && cargo run --bin get_latest_workflow_run rust/lit-node-build-commit-hash 'origin/release-manzano-*')" >> "$GITHUB_OUTPUT" - echo "LATEST_WORKFLOW_RUN_ID_CAYENNE=$(cd scripts/ci_utils && cargo run --bin get_latest_workflow_run rust/lit-node-build-commit-hash 'origin/release-cayenne-*')" >> "$GITHUB_OUTPUT" - env: - GH_PAT: ${{ secrets.GITHUB_TOKEN }} - RUST_LOG: debug - - name: Get the latest commit SHA - id: get_latest_commit_sha - run: | - echo "COMMIT_SHA_HABANERO=$(cd scripts/ci_utils && cargo run --bin get_target_branch_commit_hash 'origin/release-habanero-*')" >> "$GITHUB_OUTPUT" - echo "COMMIT_SHA_MANZANO=$(cd scripts/ci_utils && cargo run --bin get_target_branch_commit_hash 'origin/release-manzano-*')" >> "$GITHUB_OUTPUT" - echo "COMMIT_SHA_CAYENNE=$(cd scripts/ci_utils && cargo run --bin get_target_branch_commit_hash 'origin/release-cayenne-*')" >> "$GITHUB_OUTPUT" - env: - RUST_LOG: debug - - name: Download the latest build for release-habanero-* branch - uses: actions/download-artifact@v7 - with: - name: lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_HABANERO }} - run-id: ${{ steps.get_latest_workflow_run_id.outputs.LATEST_WORKFLOW_RUN_ID_HABANERO }} - github-token: ${{ secrets.GITHUB_TOKEN }} - path: rust/lit-node/lit-node/ - - name: Move the downloaded binary - run: mv lit_node target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_HABANERO }} - - name: Download the latest build for release-manzano-* branch - uses: actions/download-artifact@v7 - with: - name: lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_MANZANO }} - run-id: ${{ steps.get_latest_workflow_run_id.outputs.LATEST_WORKFLOW_RUN_ID_MANZANO }} - github-token: ${{ secrets.GITHUB_TOKEN }} - path: rust/lit-node/lit-node/ - - name: Move the downloaded binary - run: mv lit_node target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_MANZANO }} - - name: Download the latest build for release-cayenne-* branch - uses: actions/download-artifact@v7 - with: - name: lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_CAYENNE }} - run-id: ${{ steps.get_latest_workflow_run_id.outputs.LATEST_WORKFLOW_RUN_ID_CAYENNE }} - github-token: ${{ secrets.GITHUB_TOKEN }} - path: rust/lit-node/lit-node/ - - name: Move the downloaded binary - run: mv lit_node target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_CAYENNE }} - - name: Enable execute permissions for the binary - run: | - chmod +x target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_HABANERO }} - chmod +x target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_MANZANO }} - chmod +x target/debug/lit_node_${{ steps.get_latest_commit_sha.outputs.COMMIT_SHA_CAYENNE }} - - name: Setup local files for testing - run: make setup-local-files - - name: Run acceptance, component and integration tests. - run: "~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst --final-status-level pass --profile version-upgrade-tests -E 'test(/^upgrades/)' --partition count:${{ matrix.partition }}/3 --nocapture --" - + # AND together the results check_status: needs: [ lit_node_unit_tests, lit_node_integration_tests, - lit_node_version_upgrade_tests, ] runs-on: ubuntu-latest steps: @@ -296,9 +184,4 @@ jobs: echo "Integration tests failed" exit 1 fi - # TODO: enable this when you want to turn on version upgrade tests - if false && [ ${{ needs.lit_node_version_upgrade_tests.result }} != 'success' ]; then - echo "Version upgrade tests failed" - exit 1 - fi echo "All tests passed"