diff options
author | Dawid Dziurla <dawidd0811@gmail.com> | 2020-03-19 12:17:27 +0100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-21 12:55:44 +1100 |
commit | 85ddd623f68541426867736a5ced861c5c6dcacd (patch) | |
tree | 542a8bd7611284edc5a953d39136ba8f89ca3d97 /.github/workflows | |
parent | 9212dda9c395114e3a8f0b957c0d5e9b1a833bf0 (diff) |
Add CI workflow
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..0fd378528 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: Continuous Integration + +on: push + +jobs: + ci: + runs-on: ubuntu-latest + container: + image: golang:1.14 + env: + GOFLAGS: -mod=vendor + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Run gofmt -s + run: | + if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then + find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \; + exit 1; + fi + - name: Run tests + run: | + ./tests.sh + - name: Push on codecov result + uses: codecov/codecov-action@v1 + - name: Compile project on every platform + run: | + go get github.com/mitchellh/gox + gox -parallel 10 -os "linux freebsd netbsd windows" -osarch "darwin/i386 darwin/amd64" |