Skip to content

Commit

Permalink
Merge pull request #812 from wzshiming/ci/test
Browse files Browse the repository at this point in the history
ci: run tests on demand
  • Loading branch information
wzshiming authored Oct 12, 2023
2 parents a42166c + da04a80 commit 0813f31
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 14 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test Site

on:
pull_request:
paths:
- site/**/*
- demo/**/*
- .github/workflows/test-site.yaml
push:
paths:
- site/**/*
- demo/**/*
- .github/workflows/test-site.yaml

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
check-site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check site
shell: bash
run: |
make -C site check
35 changes: 21 additions & 14 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@ name: Test

on:
pull_request:
paths:
- pkg/**/*
- cmd/**/*
- e2e/**/*
- hack/**/*
- kustomize/**/*
- go.mod
- .github/workflows/test.yaml
push:
paths:
- pkg/**/*
- cmd/**/*
- e2e/**/*
- hack/**/*
- kustomize/**/*
- go.mod
- .github/workflows/test.yaml

env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
Expand All @@ -14,15 +30,6 @@ concurrency:
cancel-in-progress: true

jobs:
check-site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check site
shell: bash
run: |
make -C site check
test-build:
runs-on: ubuntu-latest
strategy:
Expand All @@ -32,7 +39,7 @@ jobs:
- nerdctl
- podman
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
Expand Down Expand Up @@ -71,7 +78,7 @@ jobs:
test-kwok-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
Expand All @@ -97,7 +104,7 @@ jobs:
continue-on-error: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
Expand Down Expand Up @@ -163,7 +170,7 @@ jobs:
continue-on-error: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
Expand All @@ -178,7 +185,7 @@ jobs:
# No binary is provided by default for control plane components outside of Linux
# https://www.downloadkubernetes.com
- name: Download Kubernetes Source Code
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ matrix.kwokctl-runtime == 'binary' && ( matrix.os == 'macos-latest' || matrix.os == 'windows-latest' ) }}
with:
repository: kubernetes/kubernetes
Expand Down

0 comments on commit 0813f31

Please sign in to comment.