Skip to content

fix: not_regex should handle all value types like regex #834

fix: not_regex should handle all value types like regex

fix: not_regex should handle all value types like regex #834

Workflow file for this run

name: Unit Tests
on:
pull_request:
push:
branches:
- main
merge_group:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Test the minimum supported Go version from go.mod and the latest stable Go 1 release.
go-version: ['1.21', '1.x']
steps:
- name: Check out source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build .
public-api:
name: Public API
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.21'
- name: Check public API snapshot
run: make api-diff
test:
name: Test (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Test the minimum supported Go version from go.mod and the latest stable Go 1 release.
go-version: ['1.21', '1.x']
steps:
- name: Check out source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go-version }}
- name: Test
run: go test -count=1 -timeout=5m ./...
- name: Test debug-image discovery
if: matrix.go-version == '1.21'
env:
BUILD_ID_SEED: ${{ github.sha }}-${{ github.job }}-${{ matrix.go-version }}
run: |
build_id=$(printf '%s' "$BUILD_ID_SEED" | sha256sum | cut -c1-16)
output=$(go test -v -count=1 -timeout=1m -run '^TestRealDebugImages$' -ldflags="-B 0x${build_id}" .)
printf '%s\n' "$output"
printf '%s\n' "$output" | grep -q -- '--- PASS: TestRealDebugImages'
race:
name: Race tests (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Test the minimum supported Go version from go.mod and the latest stable Go 1 release.
go-version: ['1.21', '1.x']
steps:
- name: Check out source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go-version }}
- name: Race tests
run: go test -race -count=1 -timeout=5m ./...
- name: Race-test debug-image discovery
if: matrix.go-version == '1.21'
env:
BUILD_ID_SEED: ${{ github.sha }}-${{ github.job }}-${{ matrix.go-version }}
run: |
build_id=$(printf '%s' "$BUILD_ID_SEED" | sha256sum | cut -c1-16)
output=$(go test -v -race -count=1 -timeout=1m -run '^TestRealDebugImages$' -ldflags="-B 0x${build_id}" .)
printf '%s\n' "$output"
printf '%s\n' "$output" | grep -q -- '--- PASS: TestRealDebugImages'
vet:
name: Go vet (Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Test the minimum supported Go version from go.mod and the latest stable Go 1 release.
go-version: ['1.21', '1.x']
steps:
- name: Check out source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go-version }}
- name: Vet
run: go vet ./...