-
Notifications
You must be signed in to change notification settings - Fork 8
42 lines (40 loc) · 1.05 KB
/
test.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
name: Run tests
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
branches:
- main
paths-ignore:
- '**.md'
jobs:
test-on-linux:
strategy:
matrix:
os-version: [ 20.04, 22.04 ]
go-version: [ 1.16, 1.17, 1.18, 1.19 ]
runs-on: ubuntu-${{ matrix.os-version }}
steps:
- uses: actions/checkout@v1
- name: check linux kernel version
run: uname -a
- name: Pull golang image
run: docker pull golang:${{ matrix.go-version }}
- name: Run all tests
run: docker run --rm -v=$(pwd):/app -w=/app --cpus=1.5 -m=1000m golang:${{ matrix.go-version }} go test -v -p 1 ./...
test-on-macos:
strategy:
matrix:
os-version: [ 12, 13 ]
go-version: [ 1.16, 1.17, 1.18, 1.19 ]
runs-on: macos-${{ matrix.os-version }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v3
with:
go-version: "${{ matrix.go-version }}"
- name: Run all tests
run: go test -v -p 1 ./...