Skip to content

✨ (go/v4) Add GitHub Actions #8

✨ (go/v4) Add GitHub Actions

✨ (go/v4) Add GitHub Actions #8

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