forked from kubernetes-sigs/kubebuilder
-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (41 loc) · 1.23 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
name: Test Sample CI
on:
push:
pull_request:
jobs:
check-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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: Install act (GitHub Actions Local Runner)
run: |
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
- name: Lint
run: |
echo "Running lint ci"
cd testdata/project-v4/
act -W .github/workflows/lint.yml
- name: Unit Tests
run: |
echo "Running unit tests ci"
cd testdata/project-v4/
act -W .github/workflows/test.yml
- name: E2e Tests
run: |
echo "Running e2e tests ci"
cd testdata/project-v4/
act -W .github/workflows/test-e2e.yml