diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 0a868787..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: CI - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [ master ] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - test: - # The type of runner that the job will run on - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Set up Go 1.17 - uses: actions/setup-go@v2 - with: - go-version: ^1.17 - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Checkout - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Run a build - run: go build ./... - - # Runs a single command using the runners shell - - name: Run a test - run: go test -p 1 -race ./... -covermode=atomic -coverprofile=./coverage.txt - - # This workflow contains a single job called "build" - ci: - # The type of runner that the job will run on - runs-on: ubuntu-20.04 - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Set up Go 1.17 - uses: actions/setup-go@v2 - with: - go-version: ^1.17 - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Checkout - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Run a test - run: go test -race ./... -covermode=atomic -coverprofile=./coverage.txt - - - name: Publish the coverage - run: bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f2949c76..89c7f68d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ name: Test # Controls when the action will run. on: - pull_request: + push: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -33,4 +33,8 @@ jobs: # Runs a single command using the runners shell, -p1 for `race: limit on 8128 simultaneously alive goroutines is exceeded, dying` at macos - name: Run a test - run: go test -race -p 1 ./... -coverpkg=./... -covermode=atomic -coverprofile=./coverage.txt + run: go test -v -race -p 1 ./... -coverpkg=./... -covermode=atomic -coverprofile=./coverage.txt + + - name: Publish the coverage + if: ${{ matrix.os }} == 'ubuntu-latest' + run: bash <(curl -s https://codecov.io/bash)