diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 826e36add..000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Coverage - -# NOTE(mhayden): Restricting branches prevents jobs from being doubled since -# a push to a pull request triggers two events. -on: - pull_request: - branches: - - "*" - push: - branches: - - master - -jobs: - test: - name: Test with Coverage - runs-on: ubuntu-latest - steps: - - name: Set up Go - uses: actions/setup-go@v1 - with: - go-version: '1.13' - - name: Check out code - uses: actions/checkout@v2 - - name: Install dependencies - run: | - go mod download - - name: Run Unit tests - run: | - go test -race -covermode atomic -coverprofile=profile.cov ./... - - name: Send coverage - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - GO111MODULE=off go get github.com/mattn/goveralls - $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 134229162..3374f6e39 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,11 +40,19 @@ jobs: - name: Install golangci-lint run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.23.7 + - name: Install goveralls + run: GO111MODULE=off go get github.com/mattn/goveralls + - name: Run golangci-lint run: $(go env GOPATH)/bin/golangci-lint run - name: Run unit tests - run: go test -v ./... + run: go test -v -race -covermode atomic -coverprofile=profile.cov ./... + + - name: Send coverage to coveralls.io + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github old_rpm_build: name: "📦 RPM (golang-github-osbuild-composer)"