diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..cb0a6ec --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,41 @@ +on: + push: + branches: + - master + - main + pull_request: +name: Build +jobs: + test: + name: Test + strategy: + matrix: + go-version: [1.15.x, 1.16.x, 1.17.x] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Test + run: go test -race -v ./ + codecov: + name: Upload coverage report to Codecov + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Test + run: go test -race -v -coverprofile=coverage.txt -covermode=atomic ./ + - uses: codecov/codecov-action@v2 + with: + files: ./coverage.txt + fail_ci_if_error: true + verbose: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 1ebac87..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -on: - push: - branches: - - master - - main - pull_request: -name: Run tests with race detection enabled -jobs: - test: - strategy: - matrix: - go-version: [1.15.x, 1.16.x, 1.17.x] - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v2 - - name: Test - run: go test -race -v ./ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cb67307..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: go - -os: - - linux - - osx - - windows - -go: - - 1.11.x - - 1.12.x - - 1.13.x - - 1.14.x - - 1.15.x - - 1.16.x - - 1.17.x - -# Enable Go Modules -env: - - GO111MODULE=on - -# Skip go get -install: true - -script: - - go test ./ -race -coverprofile=coverage.txt -covermode=atomic -v - -after_success: - - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then curl -s https://codecov.io/bash > .codecov && chmod +x .codecov && ./.codecov; else bash <(curl -s https://codecov.io/bash); fi \ No newline at end of file diff --git a/README.md b/README.md index 9a6abb4..a894117 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +Build status diff --git a/benchmark/go.mod b/benchmark/go.mod index cc573f3..ac02c36 100644 --- a/benchmark/go.mod +++ b/benchmark/go.mod @@ -3,7 +3,7 @@ module github.com/alitto/pond/benchmark go 1.17 require ( - github.com/alitto/pond v1.3.0 + github.com/alitto/pond v1.6.1 github.com/gammazero/workerpool v1.1.2 github.com/panjf2000/ants/v2 v2.4.7 )