Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporary testing patch #11961

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ on:
merge_group:
types: [checks_requested]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
setup-environment:
runs-on: ubuntu-latest
Expand All @@ -37,7 +34,6 @@ jobs:
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make gomoddownload

lint:
runs-on: ubuntu-latest
needs: [setup-environment]
Expand All @@ -61,7 +57,6 @@ jobs:
run: make -j2 golint
- name: goimpi
run: make goimpi

govulncheck:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand All @@ -86,7 +81,6 @@ jobs:
run: make install-tools
- name: Run `govulncheck`
run: make govulncheck

checks:
runs-on: ubuntu-latest
needs: [setup-environment]
Expand Down Expand Up @@ -138,7 +132,6 @@ jobs:
run: |
make crosslink
git diff -s --exit-code || (echo 'Replace statements are out of date, please run "make crosslink" and commit the changes in this PR.' && exit 1)

unittest-matrix:
strategy:
matrix:
Expand Down Expand Up @@ -170,6 +163,23 @@ jobs:
- name: Run Unit Tests
run: |
make -j4 gotest
- name: status
run: git status
- name: deepen
run: git fetch --deepen=2
- name: uncommit the patch
run: git reset --soft HEAD^
- name: status
run: git status
- uses: datadog/junit-upload-github-action@v1
if: always()
continue-on-error: true
env:
DD_GIT_BRANCH: main
with:
api-key: ${{ secrets.DD_CI_API_KEY }}
service: opentelemetry-collector
files: internal/tools/testresults/
unittest:
if: always()
runs-on: ubuntu-latest
Expand All @@ -186,7 +196,6 @@ jobs:
echo "One or more matrix jobs failed."
false
fi

test-coverage:
runs-on: ubuntu-latest
needs: [setup-environment]
Expand Down Expand Up @@ -217,7 +226,6 @@ jobs:
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # 5.1.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

cross-build-collector:
needs: [setup-environment]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -251,7 +259,6 @@ jobs:
goarch: 386
- goos: windows
goarch: amd64

steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -435,3 +435,8 @@ mdatagen-test:
cd cmd/mdatagen && $(GOCMD) install .
cd cmd/mdatagen && $(GOCMD) generate ./...
cd cmd/mdatagen && $(GOCMD) test ./...

.PHONY: gotest
gotest:
go install gotest.tools/[email protected]
@$(MAKE) for-all-target TARGET="test-junit"
5 changes: 5 additions & 0 deletions Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,8 @@ impi: $(IMPI)
.PHONY: moddownload
moddownload:
$(GOCMD) mod download

.PHONY: test-junit
test-junit:
mkdir -p $(TOOLS_MOD_DIR)/testresults
gotestsum --junitfile $(TOOLS_MOD_DIR)/testresults/$$PWD-junit.xml -- $(GOTEST_OPT) ./...
Loading