From 9f1278a0d9aa25ead64264b8287544c4a97efc67 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 26 Jan 2021 14:25:36 +0000 Subject: [PATCH] ci: initial workflow to introduce Github Actions CI --- .github/workflows/tests.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..e229e7a --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,29 @@ +name: "Runs go test on various platforms" + +# any branch is useful for testing before a PR is submitted +on: [push, pull_request] + +jobs: + go-test: + # run on pushes to any branch + # run on PRs from external forks + if: | + (github.event_name != 'pull_request') + || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id) + name: go test + runs-on: ${{ matrix.os}} + strategy: + matrix: + os: [windows-latest, ubuntu-20.04, ubuntu-latest, ubuntu-16.04, macos-latest] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Go + uses: actions/setup-go@v2 + + - name: Test + run: | + go version + go test