Migrating towards the Plan Engine concept away from Control Plane #18
Workflow file for this run
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: Pull Request Checks | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- main | |
jobs: | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
cache: true | |
- name: Install dependencies | |
run: | | |
cd planengine | |
go mod download | |
- name: Run tests | |
run: | | |
cd planengine | |
make test | |
- name: Run static analysis | |
run: | | |
cd planengine | |
make vet | |
- name: Check formatting | |
run: | | |
cd planengine | |
make fmt | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Code is not properly formatted. Please run 'make fmt' locally and commit changes." | |
exit 1 | |
fi | |
lint: | |
name: Lint Code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
cache: true | |
- name: golangci-lint | |
run: | | |
cd planengine | |
make lint | |
build: | |
name: Build Check | |
runs-on: ubuntu-latest | |
needs: [test, lint] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
cache: true | |
- name: Build | |
run: | | |
cd planengine | |
make build |