test: reorganize by concern #262
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.goarch }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| goarch: [amd64, arm64] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version-file: go.mod | |
| - run: GOARCH=${{ matrix.goarch }} go build ./... | |
| vet: | |
| name: Vet | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version-file: go.mod | |
| - run: go vet ./... | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install C compilers | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc clang | |
| - run: go test -v -race ./... | |
| test-e2e: | |
| name: Test (e2e) | |
| runs-on: ubuntu-latest | |
| container: golang:1.25 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install dependencies | |
| run: | | |
| echo 'deb http://deb.debian.org/debian-debug/ trixie-debug main' \ | |
| > /etc/apt/sources.list.d/debug.list | |
| dpkg --add-architecture arm64 | |
| apt-get update | |
| apt-get install -y --no-install-recommends \ | |
| gcc binutils \ | |
| gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu \ | |
| libc6-dev-arm64-cross \ | |
| grep grep-dbgsym | |
| apt-get download grep:arm64 grep-dbgsym:arm64 | |
| dpkg-deb -x grep_*arm64*.deb /opt/grep-arm64 | |
| dpkg-deb -x grep-dbgsym_*arm64*.deb / | |
| rm -f grep_*arm64*.deb grep-dbgsym_*arm64*.deb | |
| - name: Run e2e tests | |
| run: go test -v -tags e2e ./e2e/... |