Update .github/workflows/docker.yml #3
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
| --- | ||
|
Check failure on line 1 in .github/workflows/_go-tests.yml
|
||
| name: nitro-go-tests | ||
| on: | ||
| workflow_call: | ||
| jobs: | ||
| go-tests: | ||
| name: Full Go tests (matrix) | ||
| runs-on: arbitrator-ci | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| test-mode: [defaults, pathdb, challenge, stylus, l3challenge] | ||
| steps: | ||
| - name: Login to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| - name: Start redis | ||
| docker run -d -p 6379: 6379 redis:latest | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| - name: Setup CI | ||
| uses: ./.github/actions/ci-setup | ||
| - name: Set environment variables | ||
| run: | | ||
| mkdir -p target/tmp/deadbeefbee | ||
| echo "TMPDIR=$(pwd)/target/tmp/deadbeefbee" >> "$GITHUB_ENV" | ||
| echo "GOMEMLIMIT=6GiB" >> "$GITHUB_ENV" | ||
| echo "GOGC=80" >> "$GITHUB_ENV" | ||
| echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV" | ||
| - name: Build | ||
| run: make -j8 build test-go-deps | ||
| - name: Build all lint dependencies | ||
| run: make -j8 build-node-deps | ||
| - name: run tests without race detection and path state scheme | ||
| if: matrix.test-mode == 'pathdb' | ||
| run: >- | ||
| ${{ github.workspace }}/.github/workflows/gotestsum.sh | ||
| --tags cionly --timeout 90m --cover --test_state_scheme path | ||
| - name: run tests without race detection and hash state scheme | ||
| if: matrix.test-mode == 'defaults' | ||
| run: >- | ||
| ${{ github.workspace }}/.github/workflows/gotestsum.sh | ||
| --tags cionly --timeout 60m --test_state_scheme hash | ||
| - name: run redis tests | ||
| if: matrix.test-mode == 'defaults' | ||
| run: >- | ||
| gotestsum --format short-verbose -- -p 1 -run TestRedis ./arbnode/... ./system_tests/... | ||
| -coverprofile=coverage-redis.txt -covermode=atomic -coverpkg=./... -- --test_redis=redis://localhost:6379/0 | ||
| - name: create block input json file | ||
| if: matrix.test-mode == 'defaults' | ||
| run: >- | ||
| gotestsum --format short-verbose -- -run TestProgramStorage$ ./system_tests/... --count 1 -- | ||
| --recordBlockInputs.enable=true --recordBlockInputs.WithBaseDir="${{ github.workspace }}/target" | ||
| --recordBlockInputs.WithTimestampDirEnabled=false --recordBlockInputs.WithBlockIdInFileNameEnabled=false | ||
| - name: run arbitrator prover on block input json | ||
| if: matrix.test-mode == 'defaults' | ||
| run: | | ||
| make build-prover-bin | ||
| target/bin/prover target/machines/latest/machine.wavm.br -b \ | ||
| --json-inputs="${{ github.workspace }}/target/TestProgramStorage/block_inputs.json" | ||
| - name: run jit prover on block input json | ||
| if: matrix.test-mode == 'defaults' | ||
| run: | | ||
| make build-jit | ||
| if [ -n "$(target/bin/jit \ | ||
| --binary target/machines/latest/replay.wasm \ | ||
| --cranelift \ | ||
| --json-inputs='${{ github.workspace }}/target/TestProgramStorage/block_inputs.json')" ]; then | ||
| echo "Error: Command produced output." | ||
| exit 1 | ||
| fi | ||
| - name: build challenge tests | ||
| if: matrix.test-mode == 'challenge' | ||
| run: go test -tags challengetest ./... -run=^$ -v | ||
| - name: run L3 challenge tests | ||
| if: matrix.test-mode == 'l3challenge' | ||
| run: >- | ||
| ${{ github.workspace }}/.github/workflows/gotestsum.sh | ||
| --tags challengetest --run TestL3Challenge --timeout 120m --cover | ||
| - name: run stylus tests | ||
| if: matrix.test-mode == 'stylus' | ||
| run: >- | ||
| ${{ github.workspace }}/.github/workflows/gotestsum.sh | ||
| --tags stylustest --run TestProgramArbitrator --timeout 60m --cover | ||
| - name: Archive detailed run log | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.test-mode }}-full.log | ||
| path: full.log | ||
| - name: Upload coverage to Codecov | ||
| if: matrix.test-mode == 'defaults' | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| fail_ci_if_error: false | ||
| files: ./coverage.txt,./coverage-redis.txt | ||
| verbose: false | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||