53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: Test
|
|
on: [push, pull_request]
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
go-versions: [1.13.x, 1.14.x]
|
|
platform: [ubuntu-latest]
|
|
environment-variables: [build/config/plain.sh, build/config/libpfm4.sh]
|
|
runs-on: ${{ matrix.platform }}
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Run presubmit checks
|
|
run: make presubmit
|
|
- name: Run build
|
|
run: make build
|
|
- name: Run tests
|
|
run: make test
|
|
test-integration:
|
|
strategy:
|
|
matrix:
|
|
go-versions: [1.13.x, 1.14.x]
|
|
platform: [ubuntu-latest]
|
|
environment-variables: [build/config/plain.sh, build/config/libpfm4.sh]
|
|
runs-on: ${{ matrix.platform }}
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
path: go/src/github.com/google/cadvisor
|
|
- name: Run integration tests
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/go/src/github.com/google/cadvisor && 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
|
|
|