-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (41 loc) · 1.72 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Tests
on: [push, pull_request]
jobs:
testCore:
name: Test Core
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Set up Go 1.15
uses: actions/setup-go@v1
with:
go-version: 1.15
id: go
- name: Set up environment
run: |
go env -w GO111MODULE=on
go mod init CI
- name: Install the repository and dependencies (non-Windows)
run: go get -v -t github.com/$GITHUB_REPOSITORY@$GITHUB_SHA
if: runner.os != 'Windows'
- name: Install the repository and dependencies (Windows)
run: go get -v -t github.com/${env:GITHUB_REPOSITORY}@${env:GITHUB_SHA}
if: runner.os == 'Windows'
- name: Check that subpackages build (non-Windows)
run: go build -v -tags static_addons github.com/$GITHUB_REPOSITORY github.com/$GITHUB_REPOSITORY/coreext/... github.com/$GITHUB_REPOSITORY/cmd/... github.com/$GITHUB_REPOSITORY/testutils
if: runner.os != 'Windows'
- name: Check that subpackages build (Windows)
run: go build -v -tags static_addons github.com/${env:GITHUB_REPOSITORY} github.com/${env:GITHUB_REPOSITORY}/coreext/... github.com/${env:GITHUB_REPOSITORY}/cmd/... github.com/${env:GITHUB_REPOSITORY}/testutils
if: runner.os == 'Windows'
- name: Run tests (non-Windows)
run: |
go test github.com/$GITHUB_REPOSITORY/...
go test -race -count=3 github.com/$GITHUB_REPOSITORY/...
if: runner.os != 'Windows'
- name: Run tests (Windows)
run: |
go test github.com/${env:GITHUB_REPOSITORY}/...
go test -race -count=3 github.com/${env:GITHUB_REPOSITORY}/...
if: runner.os == 'Windows'