name: Go Tests on: push: pull_request: jobs: test: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest] steps: - name: Checkout uses: actions/checkout@v4 with: submodules: recursive - name: Set up Go uses: actions/setup-go@v5 with: go-version-file: go.mod - name: Install Rust 1.85.0 uses: dtolnay/rust-toolchain@master with: toolchain: 1.85.0 - name: Record submodule commit run: git -C vendor/nim-codex rev-parse HEAD > vendor/nim-codex/.codex-commit - name: Cache libcodex build id: cache-libcodex uses: actions/cache@v4 with: path: vendor/nim-codex/build key: ${{ runner.os }}-libcodex-${{ hashFiles('vendor/nim-codex/.codex-commit') }} - name: Build libcodex if: steps.cache-libcodex.outputs.cache-hit != 'true' run: | make update CODEX_LIB_PARAMS="-d:codex_enable_api_debug_peers=true -d:LeopardCmakeFlags=\"-DCMAKE_POSITION_INDEPENDENT_CODE=ON\"" make libcodex - name: Build codex go run: make - name: Install gotestsum run: go install gotest.tools/gotestsum@latest - name: Go test run: make test