From 05200bdf83f4141e33cb54346e7e20e5dd6cd823 Mon Sep 17 00:00:00 2001 From: c-bata Date: Fri, 18 Sep 2020 23:48:11 +0900 Subject: [PATCH] Run tests on GitHub Actions --- .github/workflows/test.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5831c40 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +name: Run tests +on: + pull_request: + branches: + - master + +jobs: + test: + name: Test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - name: Set up Go 1.14 + uses: actions/setup-go@v2 + with: + go-version: 1.14 + id: go + - name: Check out code into the Go module directory + uses: actions/checkout@master + - name: Running go tests + env: + GO111MODULE: on + run: make test + + examples: + name: Build examples + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.14 + uses: actions/setup-go@v2 + with: + go-version: 1.14 + id: go + - name: Check out code into the Go module directory + uses: actions/checkout@master + - name: Building go examples + env: + GO111MODULE: on + run: ./_example/build.sh