Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ci): Simplify CI workflow by removing unit-test job #632

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 2 additions & 26 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go
name: CI

on:
push:
Expand All @@ -7,7 +7,6 @@ on:
branches: [ main ]

jobs:

build-test:
runs-on: ubuntu-latest
steps:
Expand All @@ -18,27 +17,4 @@ jobs:
go-version-file: 'go.mod'
cache: true
- name: build
run: make build

unit-test:
runs-on: ubuntu-latest
env:
SKIP_TESTS: true
steps:
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
cluster_name: cluster
- name: Set k8s provider
run: |
kubectl create namespace test-namespace
kubectl create secret generic mysecret -n test-namespace --from-literal=key=p4ssw0rd
kubectl create configmap myconfigmap -n test-namespace --from-literal=key=configValue
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: test
run: make test
run: make build
31 changes: 31 additions & 0 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: E2E test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
e2e-test:
runs-on: ubuntu-latest
env:
SKIP_TESTS: true
steps:
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
cluster_name: cluster
- name: Set k8s provider
run: |
kubectl create namespace test-namespace
kubectl create secret generic mysecret -n test-namespace --from-literal=key=p4ssw0rd
kubectl create configmap myconfigmap -n test-namespace --from-literal=key=configValue
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: test
run: kubectl cluster-info
22 changes: 22 additions & 0 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Unit Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
unit-test:
runs-on: ubuntu-latest
env:
SKIP_TESTS: true
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: test
run: make test
Loading