-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (50 loc) · 1.22 KB
/
pull_requests.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Run tests
on:
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- run: ./scripts/ci/prepare_linux.sh
- run: go test -race -cover
- run: yarn
- run: yarn fmt
- run: ./scripts/fail_on_diff.sh
# Test examples
- run: go run main.go
working-directory: ./examples/connecthook
- run: go run main.go
working-directory: ./examples/basic
tests-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- run: ./scripts/ci/prepare_linux.sh
- run: go build
- run: go test -race -cover
tests-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- run: ./scripts/ci/prepare_windows.ps1
shell: pwsh
- run: go build
- run: go test -race -cover
tests-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- run: ./scripts/ci/prepare_macos.sh
- run: go build
- run: go test -race -cover