Skip to content

Commit

Permalink
Replace Travis CI with Github Actions (#64)
Browse files Browse the repository at this point in the history
* Add basic Github Actions workflow file

* Give the build job a name which includes the go version

* Checkout submodules in the Github workflow

* Flip around gofmt and go test in the Github workflow so the most important errors are shown first

* Replace Github workflow Go version 1.21 with stable

* Replace the Travis CI badge with a Github Actions badge in the README

* Remove Travis CI file

* Add goveralls to the Github workflow

* Only install goveralls when building with Go stable in the Github workflow

* Try to fix goveralls in Github workflow

* Try to fix goveralls in Github workflow

* Update Coveralls badge

* Only run coverage on the master branch in the Github workflow

* Use the Go version in the go.mod file instead of using a matrix

* Revert "Use the Go version in the go.mod file instead of using a matrix"

This reverts commit 12bbfc4.
  • Loading branch information
MarkKremer authored Oct 25, 2023
1 parent 631333a commit c7a067b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 28 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit c7a067b

Please sign in to comment.