From 1f38244bfe0f6f1125ccff58a1604726b6a9a9a9 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 20 Apr 2021 16:11:14 -0700 Subject: [PATCH] Add Github actions workflow to trigger error from #907 --- .github/workflows/changelog.yml | 33 -------- .github/workflows/ci.yml | 146 -------------------------------- .github/workflows/test-907.yml | 57 +++++++++++++ 3 files changed, 57 insertions(+), 179 deletions(-) delete mode 100644 .github/workflows/changelog.yml delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/test-907.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index f11751142b4..00000000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This action requires that any PR targeting the main branch should touch at -# least one CHANGELOG file. If a CHANGELOG entry is not required, add the "Skip -# Changelog" label to disable this action. - -name: changelog - -on: - pull_request: - types: [opened, synchronize, reopened, labeled, unlabeled] - branches: - - main -jobs: - changelog: - runs-on: ubuntu-latest - if: "!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')" - - steps: - - uses: actions/checkout@v2 - - - name: Check for CHANGELOG changes - run: | - # Only the latest commit of the feature branch is available - # automatically. To diff with the base branch, we need to - # fetch that too (and we only need its latest commit). - git fetch origin ${{ github.base_ref }} --depth=1 - if [[ $(git diff --name-only FETCH_HEAD | grep CHANGELOG) ]] - then - echo "A CHANGELOG was modified. Looks good!" - else - echo "No CHANGELOG was modified." - echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required." - false - fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 98613439e8c..00000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: ci -on: - push: - branches: - - main - pull_request: -env: - # Path to where test results will be saved. - TEST_RESULTS: /tmp/test-results - # Default minimum version of Go to support. - DEFAULT_GO_VERSION: 1.14 -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Install Go - uses: actions/setup-go@v2.1.3 - with: - go-version: ${{ env.DEFAULT_GO_VERSION }} - - name: Checkout Repo - uses: actions/checkout@v2 - - name: Setup Environment - run: | - echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - name: Module cache - uses: actions/cache@v2.1.5 - env: - cache-name: go-mod-cache - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} - - name: Tools cache - uses: actions/cache@v2.1.5 - env: - cache-name: go-tools-cache - with: - path: ~/.tools - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }} - - name: Run linters - run: make dependabot-check license-check lint - - name: Build - run: make examples build - - name: Check clean repository - run: make check-clean-work-tree - - test-race: - runs-on: ubuntu-latest - steps: - - name: Install Go - uses: actions/setup-go@v2.1.3 - with: - go-version: ${{ env.DEFAULT_GO_VERSION }} - - name: Checkout Repo - uses: actions/checkout@v2 - - name: Setup Environment - run: | - echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - name: Module cache - uses: actions/cache@v2.1.5 - env: - cache-name: go-mod-cache - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} - - name: Run tests with race detector - run: make test-race - - test-coverage: - runs-on: ubuntu-latest - steps: - - name: Install Go - uses: actions/setup-go@v2.1.3 - with: - go-version: ${{ env.DEFAULT_GO_VERSION }} - - name: Checkout Repo - uses: actions/checkout@v2 - - name: Setup Environment - run: | - echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - name: Module cache - uses: actions/cache@v2.1.5 - env: - cache-name: go-mod-cache - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} - - name: Run coverage tests - run: | - make test-coverage - mkdir $TEST_RESULTS - cp coverage.out $TEST_RESULTS - cp coverage.txt $TEST_RESULTS - cp coverage.html $TEST_RESULTS - - name: Upload coverage report - uses: codecov/codecov-action@v1 - with: - file: ./coverage.txt - fail_ci_if_error: true - verbose: true - - name: Store coverage test output - uses: actions/upload-artifact@v2 - with: - name: opentelemetry-go-test-output - path: ${{ env.TEST_RESULTS }} - - compatibility-test: - strategy: - matrix: - go-version: [1.15, 1.14] - os: [ubuntu-latest, macos-latest, windows-latest] - # GitHub Actions does not support arm* architectures on default - # runners. It is possible to acomplish this with a self-hosted runner - # if we want to add this in the future: - # https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow - arch: ["386", amd64] - exclude: - # Not a supported Go OS/architecture. - - os: macos-latest - arch: "386" - runs-on: ${{ matrix.os }} - steps: - - name: Install Go - uses: actions/setup-go@v2.1.3 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Environment - run: | - echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - shell: bash - - name: Module cache - uses: actions/cache@v2.1.5 - env: - cache-name: go-mod-cache - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} - - name: Run tests - env: - GOARCH: ${{ matrix.arch }} - run: make test-short diff --git a/.github/workflows/test-907.yml b/.github/workflows/test-907.yml new file mode 100644 index 00000000000..86e90f7050f --- /dev/null +++ b/.github/workflows/test-907.yml @@ -0,0 +1,57 @@ +name: "Test #907" +on: + push: + branches: + - main + pull_request: +jobs: + Go-1_14: + runs-on: windows-latest + steps: + - name: Install Go + uses: actions/setup-go@v2.1.3 + with: + go-version: 1.14 + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup Environment + run: | + echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + shell: bash + - name: Module cache + uses: actions/cache@v2.1.5 + env: + cache-name: go-mod-cache + with: + path: ~/go/pkg/mod + key: windows-latest-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} + - name: Run tests + env: + GOARCH: "386" + run: go test -failfast -count=10000 -run=TestHandlerTestSuite/TestNoDropsOnDelegate + Go-1_15: + runs-on: windows-latest + steps: + - name: Install Go + uses: actions/setup-go@v2.1.3 + with: + go-version: 1.15 + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup Environment + run: | + echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + shell: bash + - name: Module cache + uses: actions/cache@v2.1.5 + env: + cache-name: go-mod-cache + with: + path: ~/go/pkg/mod + key: windows-latest-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} + - name: Run tests + env: + GOARCH: "386" + run: go test -failfast -count=10000 -run=TestHandlerTestSuite/TestNoDropsOnDelegate