github.com/google/cadvisor@v0.49.1/.github/workflows/test.yml (about) 1 name: Test 2 on: [push, pull_request] 3 jobs: 4 test: 5 strategy: 6 matrix: 7 go-versions: ['1.22', '1.21'] 8 platform: [ubuntu-20.04] 9 environment-variables: [build/config/plain.sh, build/config/libpfm4.sh, build/config/libipmctl.sh] 10 runs-on: ${{ matrix.platform }} 11 timeout-minutes: 30 12 steps: 13 - name: Install Go 14 uses: actions/setup-go@v5 15 with: 16 go-version: ${{ matrix.go-versions }} 17 check-latest: true 18 - name: Checkout code 19 uses: actions/checkout@v4 20 - name: Run presubmit checks 21 run: | 22 source ${{ matrix.environment-variables }} 23 if [[ "${BUILD_PACKAGES}" != "" ]]; then sudo apt-get update; sudo apt-get install ${BUILD_PACKAGES}; fi 24 make -e presubmit 25 - name: Run tests 26 env: 27 GOLANG_VERSION: ${{ matrix.go-versions }} 28 run: | 29 source ${{ matrix.environment-variables }} 30 make test 31 test-integration: 32 strategy: 33 matrix: 34 go-versions: ['1.22', '1.21'] 35 platform: [ubuntu-20.04] 36 environment-variables: [build/config/plain.sh, build/config/libpfm4.sh, build/config/libipmctl.sh] 37 runs-on: ${{ matrix.platform }} 38 timeout-minutes: 30 39 steps: 40 - name: Checkout code 41 uses: actions/checkout@v4 42 - name: Run integration tests 43 env: 44 GOLANG_VERSION: ${{ matrix.go-versions }} 45 run: | 46 set -ex 47 source ${{ matrix.environment-variables }} 48 make docker-test-integration 49 - name: Upload cAdvisor log file 50 uses: actions/upload-artifact@v4 51 if: failure() 52 with: 53 name: cadvisor.log 54 path: ${{ github.workspace }}/go/src/github.com/google/cadvisor/cadvisor.log