Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests on pull requests #50

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
name: Go
name: "Unit and Build Tests"

on:
- push
push:
pull_request:
branches: [ master ]


jobs:
build-test:
runs-on: "ubuntu-latest"

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.16
go-version: 1.19

- name: Test
run: make test
- name: "Build & test"
run: "make tools test cross_compile"

- name: Build
run: make tools cross_compile
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: builds/pkg/*/gotty
37 changes: 0 additions & 37 deletions .github/workflows/pre-release.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ README-options:
rm options.txt.tmp

tools:
go get github.com/mitchellh/gox
go get github.com/tcnksm/ghr
go install github.com/mitchellh/gox@latest
go install github.com/tcnksm/ghr@latest

test:
if [ `go fmt $(go list ./... | grep -v /vendor/) | wc -l` -gt 0 ]; then echo "go fmt error"; exit 1; fi
Expand Down