mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Run integration test CI in parallel (#8156)
* Run integration test CI in parallel * Define go version in E2E
This commit is contained in:
parent
c97211866a
commit
7f58a1cb23
11
.github/workflows/integration.yaml
vendored
11
.github/workflows/integration.yaml
vendored
|
@ -35,6 +35,11 @@ jobs:
|
|||
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@v3
|
||||
|
@ -58,16 +63,16 @@ jobs:
|
|||
run: |
|
||||
chmod +x ./dist/artifacts/k3s
|
||||
mkdir -p $GOCOVERDIR
|
||||
sudo -E env "PATH=$PATH" go test -v -timeout=45m ./tests/integration/... -run Integration
|
||||
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 coverage.out
|
||||
run: go tool covdata textfmt -i $GOCOVERDIR -o ${{ matrix.itest }}.out
|
||||
- name: Upload Results To Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: ./coverage.out
|
||||
files: ./${{ matrix.itest }}.out
|
||||
flags: inttests # optional
|
||||
verbose: true # optional (default = false)
|
|
@ -44,7 +44,7 @@ RUN vagrant box add generic/ubuntu2004 --provider libvirt --force
|
|||
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"; \
|
||||
chmod +x ./kubectl; \
|
||||
mv ./kubectl /usr/local/bin/kubectl
|
||||
RUN GO_VERSION=$(curl https://go.dev/VERSION?m=text); \
|
||||
RUN GO_VERSION=go1.20.6; \
|
||||
curl -O -L "https://golang.org/dl/${GO_VERSION}.linux-amd64.tar.gz"; \
|
||||
rm -rf /usr/local/go; \
|
||||
tar -C /usr/local -xzf ${GO_VERSION}.linux-amd64.tar.gz;
|
||||
|
|
Loading…
Reference in New Issue
Block a user