diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..e2f3bcd --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,47 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: ['1.14', 'stable'] + name: Build with Go ${{ matrix.go-version }} + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} + + - name: Install goveralls + if: ${{ matrix.go-version == 'stable' && github.ref == 'refs/heads/master' }} + run: go install github.com/mattn/goveralls@latest + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v -covermode atomic -coverprofile=covprofile ./... + + - name: Gofmt + run: gofmt -d ./ + + - name: Send coverage + if: ${{ matrix.go-version == 'stable' && github.ref == 'refs/heads/master' }} + env: + COVERALLS_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + run: goveralls -coverprofile=covprofile -service=github diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9a0a41b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: go - -go: - - "1.12" - - tip - -notifications: - email: false - -env: - global: - # Coveralls.io token. - - secure: "JtfIj2ItU0o6/wxnwaCULmPnWO1fQHrX3hGbWey56hPzybA3pQEs5YOZt16nQU5GS8p3Z3OIILUP4LGebqsLU5dyWA/GxnZv45MoZ8TS8lB7aie7l5Y6yYvq0ZBJoMWxXSY6sZJ1sKJG1F7NlQoknZToxvlkfF4nP9N5RQpL8iU=" - -install: - - go get -t ./... - -before_script: - - wget https://github.com/mewmew/ci/raw/master/get_tools.sh - - chmod +x get_tools.sh - - ./get_tools.sh - - wget https://github.com/mewmew/ci/raw/master/ci_checks.sh - - chmod +x ci_checks.sh - -script: - - ./ci_checks.sh diff --git a/README.md b/README.md index 875064f..65e2e55 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # flac -[![Build Status](https://travis-ci.org/mewkiz/flac.svg?branch=master)](https://travis-ci.org/mewkiz/flac) -[![Coverage Status](https://img.shields.io/coveralls/mewkiz/flac.svg)](https://coveralls.io/r/mewkiz/flac?branch=master) +[![Go build status](https://github.com/mewkiz/flac/actions/workflows/go.yml/badge.svg?branch=master)](https://github.com/mewkiz/flac/actions/workflows/go.yml) +[![Coverage Status](https://coveralls.io/repos/github/mewkiz/flac/badge.svg?branch=master)](https://coveralls.io/github/mewkiz/flac?branch=master) [![GoDoc](https://pkg.go.dev/badge/github.com/mewkiz/flac)](https://pkg.go.dev/github.com/mewkiz/flac) This package provides access to [FLAC][1] (Free Lossless Audio Codec) streams.