diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c59cae50..c585ef04a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,9 @@ defaults: jobs: test: - # The default name will include the "go-version-is" parameter, whcih is - # derived from go-version and redundant, so we supply an explicit templated - # name. + # The default name will include the "go-version-is" parameter below, which + # is derived from go-version and redundant, so we supply an explicit + # templated name. name: Run tests (${{ matrix.os }}, ${{ matrix.go-version }}) strategy: matrix: @@ -54,6 +54,31 @@ jobs: name: cover-${{ matrix.os == 'ubuntu' && 'linux' || matrix.os }} path: cover + emulated_tests: + name: Run tests (emulated ${{ matrix.go-arch }}) + strategy: + matrix: + go-arch: [riscv64, s390x] + env: + ELVISH_TEST_TIME_SCALE: 20 + GOARCH: ${{ matrix.go-arch }} + runs-on: ubuntu-latest + steps: + - name: Set up emulator + run: | + sudo apt install binfmt-support qemu-user-static + update-binfmts --display + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.22.x + - name: Test with emulator + run: | + go test -race ./... + cd website; go test -race ./... + # The purpose of running benchmarks in GitHub Actions is primarily to ensure # that the benchmark code runs and doesn't crash. GitHub Action runners don't # have a stable enough environment to produce reliable benchmark numbers.