diff --git a/.github/workflows/test-golang.yml b/.github/workflows/test-golang.yml new file mode 100644 index 00000000000..47500be5e43 --- /dev/null +++ b/.github/workflows/test-golang.yml @@ -0,0 +1,31 @@ +name: Test Golang + +# run CI on pushes to master, and on all PRs (even the ones that target other +# branches) + +on: + push: + branches: [master] + pull_request: + +# set ESM_DISABLE_CACHE=true (will be JSON parsed) +jobs: + gotest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + - name: Set up Go 1.15 + uses: actions/setup-go@v1 + with: + go-version: 1.15 + - name: cache Go modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('packages/cosmic-swingset/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: go test + run: cd golang && go test ./...