forked from kubernetes-sigs/kubebuilder
-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (44 loc) · 1.22 KB
/
test-sample-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Test Sample CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
check-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install GitHub CLI
run: sudo apt-get install gh -y
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '~1.22'
- name: Prepare the environment
run: |
KUSTOMIZATION_FILE_PATH="testdata/project-v4/config/default/kustomization.yaml"
sed -i '25s/^#//' $KUSTOMIZATION_FILE_PATH
sed -i '51s/^#//' $KUSTOMIZATION_FILE_PATH
cd testdata/project-v4/
go mod tidy
make generate
make manifests
- name: Lint
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Running lint ci"
gh workflow run lint.yml
- name: Unit Tests
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Running unit tests ci"
gh workflow run test.yml
- name: E2e Tests
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Running e2e tests ci"
gh workflow run test-e2e.yml