Skip to content

CI pipeline for PR - (#36) feat: Extend PR pipeline to generate files in GitHub Actions #42

CI pipeline for PR - (#36) feat: Extend PR pipeline to generate files in GitHub Actions

CI pipeline for PR - (#36) feat: Extend PR pipeline to generate files in GitHub Actions #42

Workflow file for this run

# This workflow will build and test a golang project
name: PR CI
run-name: "CI pipeline for PR - (#${{ github.event.number }}) ${{ github.event.pull_request.title }}"
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
test:
name: Continuous integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Download Go dependencies
run: go get ./... && go mod tidy
- name: Check if all dependencies were commited
shell: bash
run: |
if [ "$(git status --porcelain)" ]; then
git status
exit 1
else
exit 0
fi
- name: Build codegen
run: go build -v ./...
- name: Test codegen
run: go test -v ./...
generate:
needs: ci

Check failure on line 45 in .github/workflows/pr_ci.yml

View workflow run for this annotation

GitHub Actions / PR CI

Invalid workflow file

The workflow is not valid. .github/workflows/pr_ci.yml (Line: 45, Col: 12): Job 'generate' depends on unknown job 'ci'.
name: Generate code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Download Go dependencies
run: go get ./... && go mod tidy
- name: Build codegen
run: go build -v ./...
- name: Execute codegen for SDK
run: go run cmd/codegen/main.go -t mksdk
- name: List Generated Files
run: |
echo "Generated Files:"
ls ../generated/pango