OTEL-738: Add Custom Container Tag Support (datadog.container.tag prefix) #774
Workflow file for this run
This file contains 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: test | |
on: | |
push: | |
branches: [main] | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+*" | |
pull_request: | |
types: [opened, synchronize, reopened, labeled, unlabeled] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
setup-environment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.7 | |
- name: Cache Go | |
id: go-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/bin | |
~/go/pkg/mod | |
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('internal/tools/**') }} | |
- name: Install dependencies | |
if: steps.go-cache.outputs.cache-hit != 'true' | |
run: make for-all CMD="go mod download" | |
- name: Install Tools | |
if: steps.go-cache.outputs.cache-hit != 'true' | |
run: make install-tools | |
unittest: | |
strategy: | |
matrix: | |
go-version: ['1.21', '1.20'] | |
runs-on: ubuntu-latest | |
needs: [setup-environment] | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Cache Go | |
id: go-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/bin | |
~/go/pkg/mod | |
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('internal/tools/**') }} | |
- name: Cache Build | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/go-build | |
key: unittest-${{ runner.os }}-go-build-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('internal/tools/**') }} | |
- name: Run Unit Tests | |
run: make test | |
lint: | |
runs-on: ubuntu-latest | |
needs: [setup-environment] | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ~1.20.7 | |
- name: Cache Go | |
id: go-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/bin | |
~/go/pkg/mod | |
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('internal/tools/**') }} | |
- name: Cache Build | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/go-build | |
key: lint-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('internal/tools/**') }} | |
- name: Check go mod tidy | |
run: make tidy && git diff -s --exit-code || (echo "make tidy needed"; exit 1) | |
- name: Check gofmt | |
run: make fmt && git diff -s --exit-code || (echo "make fmt needed"; exit 1) | |
- name: Check licenses file | |
run: make gen-licenses && git diff --exit-code || (echo "make gen-licenses needed"; exit 1) | |
- name: Check golangci-lint | |
run: make lint OPTS="--timeout 2m" | |
breaking-changes: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.pull_request.labels.*.name, 'breaking-change') && github.event_name == 'pull_request'}} | |
needs: [setup-environment] | |
steps: | |
- name: Checkout base branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.base_ref }} | |
path: ${{ github.base_ref }} | |
- name: Checkout HEAD | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
path: ${{ github.head_ref }} | |
- name: Cache Go | |
id: go-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/bin | |
~/go/pkg/mod | |
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('internal/tools/**') }} | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ~1.20.7 | |
- name: Install tools | |
run: | | |
cd ${{ github.head_ref }} | |
make install-tools | |
- name: Generate-States | |
run: | | |
cd ${{ github.base_ref }} | |
make apidiff-generate APIHEADERS=~/apidiff-data | |
- name: Compare-States | |
run: | | |
cd ${{ github.head_ref }} | |
make apidiff-compare APIHEADERS=~/apidiff-data |