Validate file paths in ReadFile and sanitize HTML in process table #2930
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| go-versions: ['1.25'] | |
| platform: [ubuntu-24.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@v6 | |
| with: | |
| go-version: ${{ matrix.go-versions }} | |
| check-latest: true | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - 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: | |
| include: | |
| # bookworm: all environment configs | |
| - go-versions: '1.25' | |
| platform: ubuntu-24.04 | |
| environment-variables: build/config/plain.sh | |
| debian-version: bookworm | |
| - go-versions: '1.25' | |
| platform: ubuntu-24.04 | |
| environment-variables: build/config/libpfm4.sh | |
| debian-version: bookworm | |
| - go-versions: '1.25' | |
| platform: ubuntu-24.04 | |
| environment-variables: build/config/libipmctl.sh | |
| debian-version: bookworm | |
| # trixie: only plain config | |
| - go-versions: '1.25' | |
| platform: ubuntu-24.04 | |
| environment-variables: build/config/plain.sh | |
| debian-version: trixie | |
| runs-on: ${{ matrix.platform }} | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Run integration tests | |
| env: | |
| GOLANG_VERSION: ${{ matrix.go-versions }} | |
| DEBIAN_VERSION: ${{ matrix.debian-version }} | |
| run: | | |
| set -ex | |
| source ${{ matrix.environment-variables }} | |
| make docker-test-integration | |
| - name: Upload cAdvisor log file | |
| uses: actions/upload-artifact@v6 | |
| if: failure() | |
| with: | |
| name: cadvisor-${{ matrix.debian-version }}.log | |
| path: ${{ github.workspace }}/go/src/github.com/google/cadvisor/cadvisor.log | |
| test-integration-crio: | |
| strategy: | |
| matrix: | |
| go-versions: ['1.25'] | |
| platform: [ubuntu-24.04] | |
| runs-on: ${{ matrix.platform }} | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Run CRI-O integration tests | |
| env: | |
| GOLANG_VERSION: ${{ matrix.go-versions }} | |
| run: | | |
| set -ex | |
| source build/config/crio.sh | |
| make docker-test-integration-crio | |
| - name: Upload cAdvisor log file | |
| uses: actions/upload-artifact@v6 | |
| if: failure() | |
| with: | |
| name: cadvisor-crio.log | |
| path: ${{ github.workspace }}/go/src/github.com/google/cadvisor/cadvisor.log |