do not delete chaos-mesh namespace #13357
Workflow file for this run
This file contains 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: ci | |
on: | |
pull_request: | |
branches: | |
- master | |
- release-* | |
push: | |
branches: | |
- master | |
- release-* | |
jobs: | |
pull: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
job: | |
- verify | |
- build | |
- test | |
- e2e-examples | |
steps: | |
# the GITHUB_SHA env is not the real commit hash but is the pre-merge commit ID for `pull_request` event, | |
# see https://github.community/t/github-sha-isnt-the-value-expected/17903/2 | |
# so we checkout the repo with `fetch-depth: 2` and let `codecov/codecov-action` to retrieve the real commit hash. | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
with: | |
path: go/src/github.com/${{ github.repository }} | |
fetch-depth: 2 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go/src/github.com/${{ github.repository }}/go.mod | |
check-latest: true | |
- name: Set vars | |
run: | | |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV | |
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV | |
- name: Try to use build cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ env.GOCACHE }} | |
${{ env.GOMODCACHE }} | |
key: ${{ runner.os }}-go-${{ hashFiles(format('go/src/github.com/{0}/**/go.sum', github.repository)) }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: ${{ matrix.job }} | |
run: | | |
# workaround for https://github.com/actions/setup-go/issues/14 | |
export GOPATH=${GITHUB_WORKSPACE}/go | |
export PATH=$PATH:$GOPATH/bin | |
if [[ "$job" == "verify" ]]; then | |
make check-setup check | |
elif [[ "$job" == "build" ]]; then | |
make docker e2e-docker cli debug-build-docker | |
elif [[ "$job" == "test" ]]; then | |
make test GOFLAGS=-race GO_COVER=y | |
else | |
make $job | |
fi | |
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }} | |
env: | |
job: ${{ matrix.job }} | |
- name: Upload test coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
flags: unittest | |
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }} | |
if: ${{ matrix.job == 'test' }} | |
- name: Set up tmate session | |
if: ${{ matrix.job == 'e2e-examples' && failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 60 |