mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
9d9fbf4ff4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
name: Integration Test Coverage
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "channel.yaml"
|
|
- "install.sh"
|
|
- "tests/**"
|
|
- "!tests/integration**"
|
|
- ".github/**"
|
|
- "!.github/workflows/integration.yaml"
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "channel.yaml"
|
|
- "install.sh"
|
|
- "tests/**"
|
|
- "!tests/integration**"
|
|
- "!tests/e2e**"
|
|
- ".github/**"
|
|
- "!.github/workflows/integration.yaml"
|
|
workflow_dispatch: {}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
GOCOVERDIR: /tmp/k3scov
|
|
|
|
jobs:
|
|
build:
|
|
uses: ./.github/workflows/build-k3s.yaml
|
|
test:
|
|
needs: build
|
|
name: Integration Tests
|
|
runs-on: ubuntu-20.04
|
|
timeout-minutes: 45
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
itest: [certrotation, etcdrestore, localstorage, startup, custometcdargs, etcdsnapshot, kubeflags, longhorn, secretsencryption]
|
|
max-parallel: 3
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Install Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21.5'
|
|
check-latest: true
|
|
cache: true
|
|
cache-dependency-path: |
|
|
**/go.sum
|
|
**/go.mod
|
|
- name: "Download k3s binary"
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: k3s
|
|
path: ./dist/artifacts
|
|
- name: Run Integration Tests
|
|
run: |
|
|
chmod +x ./dist/artifacts/k3s
|
|
mkdir -p $GOCOVERDIR
|
|
sudo -E env "PATH=$PATH" go test -v -timeout=45m ./tests/integration/${{ matrix.itest }}/... -run Integration
|
|
- name: On Failure, Launch Debug Session
|
|
if: ${{ failure() }}
|
|
uses: mxschmitt/action-tmate@v3
|
|
timeout-minutes: 5
|
|
- name: Generate coverage report
|
|
run: go tool covdata textfmt -i $GOCOVERDIR -o ${{ matrix.itest }}.out
|
|
- name: Upload Results To Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
files: ./${{ matrix.itest }}.out
|
|
flags: inttests # optional
|
|
verbose: true # optional (default = false)
|