Skip to content

Commit ff500a0

Browse files
Fix #203 - Update parsers to DSL 1.0.0 (#218)
1 parent b9ff81b commit ff500a0

File tree

216 files changed

+7655
-22749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+7655
-22749
lines changed

.github/workflows/Go-SDK-Check-k8s-integration.yaml

-62
This file was deleted.
+61-16
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Copyright 2020 The Serverless Workflow Specification Authors
1+
# Copyright 2025 The Serverless Workflow Specification Authors
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
66
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
7+
# http://www.apache.org/licenses/LICENSE-2.0
88
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
name: Go SDK PR Checks
16+
1617
on:
1718
pull_request:
1819
paths-ignore:
@@ -23,24 +24,28 @@ on:
2324
branches:
2425
- main
2526

27+
2628
permissions:
2729
contents: read
2830

2931
env:
3032
GO_VERSION: 1.22
33+
3134
jobs:
3235
basic_checks:
3336
name: Basic Checks
3437
runs-on: ubuntu-latest
3538
steps:
3639
- name: Checkout Code
3740
uses: actions/checkout@v4
38-
- name: Setup Go ${{ env.GO_VERSION }}
41+
42+
- name: Setup Go
3943
uses: actions/setup-go@v5
4044
with:
4145
go-version: ${{ env.GO_VERSION }}
4246
id: go
43-
- name: Cache dependencies
47+
48+
- name: Cache Go Modules
4449
uses: actions/cache@v4
4550
with:
4651
path: |
@@ -49,33 +54,73 @@ jobs:
4954
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
5055
restore-keys: |
5156
${{ runner.os }}-go-
52-
- name: Cache tools
57+
58+
- name: Cache Tools
5359
uses: actions/cache@v4
5460
with:
5561
path: ~/go/bin
5662
key: ${{ runner.os }}-go-tools-${{ hashFiles('**/tools.sum') }}
5763
restore-keys: |
5864
${{ runner.os }}-go-tools-
65+
5966
- name: Check Headers
6067
run: |
6168
make addheaders
6269
changed_files=$(git status -s | grep -v 'go.mod\|go.sum\|tools.mod\|tools.sum' || :)
63-
[[ -z "$changed_files" ]] || (printf "Some files are missing the headers: \n$changed_files\n Did you run 'make lint' before sending the PR" && exit 1)
64-
- name: Check DeepCopy Generation
65-
run: |
66-
export GOPATH=$(go env GOPATH)
67-
make deepcopy
70+
if [[ -n "$changed_files" ]]; then
71+
echo "❌ Some files are missing headers:\n$changed_files"
72+
exit 1
73+
fi
74+
6875
- name: Check Formatting
6976
run: |
7077
make fmt
7178
changed_files=$(git status -s | grep -v 'go.mod\|go.sum\|tools.mod\|tools.sum' || :)
72-
[[ -z "$changed_files" ]] || (printf "Some files are not formatted properly: \n$changed_files\n Did you run 'make test' before sending the PR?" && exit 1)
73-
- name: Check lint
74-
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 - Please ALWAYS use SHA to avoid GH sec issues
79+
if [[ -n "$changed_files" ]]; then
80+
echo "❌ Some files are not formatted correctly:\n$changed_files"
81+
exit 1
82+
fi
83+
84+
- name: Run Linter
85+
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.1.1 - Please ALWAYS use SHA to avoid GH sec issues
7586
with:
7687
version: latest
77-
- name: Install cover
78-
run: go get -modfile=tools.mod golang.org/x/tools/cmd/cover
88+
89+
- name: Install Cover Tool
90+
run: go install golang.org/x/tools/cmd/cover@latest
91+
7992
- name: Run Unit Tests
93+
run: go test ./... -coverprofile=test_coverage.out -covermode=atomic
94+
95+
- name: Upload Coverage Report
96+
uses: actions/upload-artifact@v3
97+
with:
98+
name: Test Coverage Report
99+
path: test_coverage.out
100+
101+
integration_tests:
102+
name: Integration Tests
103+
runs-on: ubuntu-latest
104+
needs: basic_checks
105+
steps:
106+
- name: Checkout Code
107+
uses: actions/checkout@v4
108+
109+
- name: Setup Go
110+
uses: actions/setup-go@v5
111+
with:
112+
go-version: ${{ env.GO_VERSION }}
113+
id: go
114+
115+
- name: Run Integration Tests
80116
run: |
81-
go test ./... -coverprofile test_coverage.out -covermode=atomic
117+
chmod +x ./hack/integration-test.sh
118+
./hack/integration-test.sh
119+
continue-on-error: true
120+
121+
- name: Upload JUnit Report
122+
if: always()
123+
uses: actions/upload-artifact@v3
124+
with:
125+
name: Integration Test JUnit Report
126+
path: ./integration-test-junit.xml

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ bin
33
*.out
44
.vscode
55

6+
integration-test-junit.xml

Makefile

+6-36
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,14 @@ lint:
2222
.PHONY: test
2323
coverage="false"
2424

25-
test: deepcopy buildergen
25+
test:
2626
@echo "🧪 Running tests..."
2727
@go test ./...
2828
@echo "✅ Tests completed!"
2929

30-
deepcopy: $(DEEPCOPY_GEN) ## Download deepcopy-gen locally if necessary.
31-
@echo "📦 Running deepcopy-gen..."
32-
@./hack/deepcopy-gen.sh deepcopy > /dev/null
33-
@make lint
34-
@echo "✅ Deepcopy generation and linting completed!"
35-
36-
buildergen: $(BUILDER_GEN) ## Download builder-gen locally if necessary.
37-
@echo "📦 Running builder-gen..."
38-
@./hack/builder-gen.sh buildergen > /dev/null
39-
@make lint
40-
@echo "✅ Builder generation and linting completed!"
41-
42-
.PHONY: kube-integration
43-
kube-integration: controller-gen
44-
@echo "📦 Generating Kubernetes objects..."
45-
@$(CONTROLLER_GEN) object:headerFile="./hack/boilerplate.txt" paths="./kubernetes/api/..."
46-
@echo "📦 Generating Kubernetes CRDs..."
47-
@$(CONTROLLER_GEN) rbac:roleName=manager-role crd:allowDangerousTypes=true webhook paths="./kubernetes/..." output:crd:artifacts:config=config/crd/bases
48-
@make lint
49-
@echo "✅ Kubernetes integration completed!"
50-
51-
52-
####################################
53-
# install controller-gen tool
54-
## Location to install dependencies to
55-
LOCALBIN ?= $(shell pwd)/bin
56-
$(LOCALBIN):
57-
mkdir -p $(LOCALBIN)
58-
59-
CONTROLLER_TOOLS_VERSION ?= v0.16.3
60-
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
61-
.PHONY: controller-gen
62-
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
63-
$(CONTROLLER_GEN): $(LOCALBIN)
64-
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
30+
.PHONY: integration-test
6531

32+
integration-test:
33+
@echo "🔄 Running integration tests..."
34+
@./hack/integration-test.sh
35+
@echo "✅ Integration tests completed!"

0 commit comments

Comments
 (0)