✨ (go/v4) Add GitHub Actions #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
cd testdata/project-v4/ | |
gh workflow run .github/lint.yml | |
- name: Unit Tests | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "Running unit tests ci" | |
cd testdata/project-v4/ | |
gh workflow run .github/unit-tests.yml | |
- name: E2e Tests | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "Running e2e tests ci" | |
cd testdata/project-v4/ | |
gh workflow run .github/e2e-tests.yml |