k3s/.github/workflows/integration.yaml
Pedro Tashima d8ae6ef59b
Update to v1.27.4 (#8014)
Signed-off-by: Pedro Tashima <pedro.tashima@suse.com>
Co-authored-by: Pedro Tashima <pedro.tashima@suse.com>
2023-07-20 13:14:51 -03:00

73 lines
1.8 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: 30
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20.6'
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=30m ./tests/integration/... -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 coverage.out
- name: Upload Results To Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
flags: inttests # optional
verbose: true # optional (default = false)