-
Notifications
You must be signed in to change notification settings - Fork 35
42 lines (39 loc) · 1.14 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
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.17.x, 1.18.x]
platform: [ubuntu-20.04, windows-latest, macos-11]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Lint
run: make lint
- name: Cross build
if: ${{ runner.os == 'Linux' }}
run: make cross
- name: Test
run: make test
# some features, like openat2, require a newer kernel
fedora:
# nested virtualization is only available on macOS hosts
runs-on: macos-10.15
steps:
- uses: actions/checkout@v3
- name: prepare vagrant
run: |
ln -sf .ci/Vagrantfile.fedora Vagrantfile
# Retry if it fails (download.fedoraproject.org returns 404 sometimes)
vagrant up || vagrant up
vagrant ssh-config >> ~/.ssh/config
- name: system info
run: ssh default 'sh -exc "uname -a && df -T"'
- name: tests
run: ssh default 'cd /vagrant && make test'