2021-07-26 16:59:33 +00:00
|
|
|
name: Integration Test Coverage
|
|
|
|
on:
|
|
|
|
push:
|
2021-10-29 16:47:37 +00:00
|
|
|
paths-ignore:
|
2021-07-26 16:59:33 +00:00
|
|
|
- "**.md"
|
2021-11-15 18:50:38 +00:00
|
|
|
- "channel.yaml"
|
2021-10-29 16:47:37 +00:00
|
|
|
- "install.sh"
|
2022-10-06 19:27:44 +00:00
|
|
|
- "tests/**"
|
|
|
|
- "!tests/integration**"
|
2021-11-15 18:50:38 +00:00
|
|
|
- ".github/**"
|
|
|
|
- "!.github/workflows/integration.yaml"
|
2021-07-26 16:59:33 +00:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
2021-11-15 18:50:38 +00:00
|
|
|
- "channel.yaml"
|
2021-10-29 16:47:37 +00:00
|
|
|
- "install.sh"
|
2022-10-06 19:27:44 +00:00
|
|
|
- "tests/**"
|
|
|
|
- "!tests/integration**"
|
2021-11-15 18:50:38 +00:00
|
|
|
- ".github/**"
|
|
|
|
- "!.github/workflows/integration.yaml"
|
2021-08-27 06:40:06 +00:00
|
|
|
workflow_dispatch: {}
|
2023-01-12 21:57:57 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-07-26 16:59:33 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
2022-10-06 19:27:44 +00:00
|
|
|
uses: ./.github/workflows/build-k3s.yaml
|
2021-07-26 16:59:33 +00:00
|
|
|
test:
|
|
|
|
needs: build
|
|
|
|
name: Integration Tests
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-10-06 17:50:46 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-07-26 16:59:33 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
2022-10-06 17:50:46 +00:00
|
|
|
- name: Install Go
|
2023-03-20 10:08:12 +00:00
|
|
|
uses: actions/setup-go@v4
|
2022-10-06 17:50:46 +00:00
|
|
|
with:
|
2023-04-19 04:48:36 +00:00
|
|
|
go-version: '1.20.3'
|
2022-10-06 17:50:46 +00:00
|
|
|
check-latest: true
|
|
|
|
cache: true
|
|
|
|
cache-dependency-path: |
|
|
|
|
**/go.sum
|
|
|
|
**/go.mod
|
2021-07-26 16:59:33 +00:00
|
|
|
- name: "Download k3s binary"
|
2023-01-17 19:04:34 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-07-26 16:59:33 +00:00
|
|
|
with:
|
|
|
|
name: k3s
|
|
|
|
path: ./dist/artifacts
|
|
|
|
- name: Run Integration Tests
|
|
|
|
run: |
|
|
|
|
chmod +x ./dist/artifacts/k3s
|
2022-08-31 22:40:17 +00:00
|
|
|
sudo -E env "PATH=$PATH" go test -v ./tests/integration/... -run Integration
|
2021-07-26 16:59:33 +00:00
|
|
|
- name: On Failure, Launch Debug Session
|
|
|
|
if: ${{ failure() }}
|
|
|
|
uses: mxschmitt/action-tmate@v3
|
2021-12-01 21:14:59 +00:00
|
|
|
timeout-minutes: 5
|