-
Notifications
You must be signed in to change notification settings - Fork 2.3k
53 lines (53 loc) · 1.65 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
43
44
45
46
47
48
49
50
51
52
53
name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-versions: ['1.20', '1.19']
platform: [ubuntu-20.04]
environment-variables: [build/config/plain.sh, build/config/libpfm4.sh, build/config/libipmctl.sh]
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-versions }}
- name: Checkout code
uses: actions/checkout@v3
- name: Run presubmit checks
run: |
source ${{ matrix.environment-variables }}
if [[ "${BUILD_PACKAGES}" != "" ]]; then sudo apt-get update; sudo apt-get install ${BUILD_PACKAGES}; fi
make -e presubmit
- name: Run tests
env:
GOLANG_VERSION: ${{ matrix.go-versions }}
run: |
source ${{ matrix.environment-variables }}
make test
test-integration:
strategy:
matrix:
go-versions: ['1.20', '1.19']
platform: [ubuntu-20.04]
environment-variables: [build/config/plain.sh, build/config/libpfm4.sh, build/config/libipmctl.sh]
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run integration tests
env:
GOLANG_VERSION: ${{ matrix.go-versions }}
run: |
set -ex
source ${{ matrix.environment-variables }}
make docker-test-integration
- name: Upload cAdvisor log file
uses: actions/upload-artifact@v1
if: failure()
with:
name: cadvisor.log
path: ${{ github.workspace }}/go/src/github.com/google/cadvisor/cadvisor.log