-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87534f7
commit b6d09d5
Showing
139 changed files
with
9,324 additions
and
66 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# This workflow will lint all Go projects in the repository | ||
name: ci-go-lint | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
jobs: | ||
get-dirs: | ||
if: github.event_name == 'pull_request' | ||
name: find go projects | ||
runs-on: ubuntu-latest | ||
outputs: | ||
dirs: ${{ steps.get-dirs.outputs.dirs }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Search for go.mod files | ||
id: get-dirs | ||
run: echo "dirs=$(find . -name 'go.mod' -exec dirname {} \; | jq -Rsc 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT} | ||
|
||
go-lint: | ||
needs: get-dirs | ||
if: github.event_name == 'pull_request' | ||
name: lint | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dir: ${{ fromJson(needs.get-dirs.outputs.dirs) }} | ||
defaults: | ||
run: | ||
working-directory: ${{ matrix.dir }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache-dependency-path: "${{ matrix.dir }}/go.sum" | ||
go-version-file: "${{ matrix.dir }}/go.mod" | ||
- name: Generate Code | ||
run: go generate ./... | ||
- name: Run Linter | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
working-directory: ${{ matrix.dir }} | ||
version: latest | ||
args: --timeout=10m |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This workflow will test all Go projects in the repository | ||
name: ci-go-test | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
jobs: | ||
get-dirs: | ||
if: github.event_name == 'pull_request' | ||
name: find go projects | ||
runs-on: ubuntu-latest | ||
outputs: | ||
dirs: ${{ steps.get-dirs.outputs.dirs }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Search for go.mod files | ||
id: get-dirs | ||
run: echo "dirs=$(find . -name 'go.mod' -exec dirname {} \; | jq -Rsc 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT} | ||
|
||
go-test: | ||
needs: get-dirs | ||
name: test | ||
runs-on: warp-ubuntu-latest-x64-4x | ||
strategy: | ||
matrix: | ||
dir: ${{ fromJson(needs.get-dirs.outputs.dirs) }} | ||
defaults: | ||
run: | ||
working-directory: ${{ matrix.dir }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache-dependency-path: "${{ matrix.dir }}/go.sum" | ||
go-version-file: "${{ matrix.dir }}/go.mod" | ||
- name: Generate Code | ||
run: go generate ./... | ||
- name: Run Unit Tests | ||
run: | | ||
go install github.com/jstemmer/go-junit-report/v2@latest | ||
go test -v -race 2>&1 ./... | go-junit-report -set-exit-code -iocopy -out report.xml | ||
- name: Generate Test Summary | ||
if: always() | ||
uses: test-summary/action@v2 | ||
with: | ||
paths: "${{ matrix.dir }}/report.xml" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: ci-sdk-go-build | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
jobs: | ||
get-dirs: | ||
if: github.event_name == 'pull_request' | ||
name: find tools and examples | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tools_dirs: ${{ steps.get-tools-dirs.outputs.dirs }} | ||
examples_dirs: ${{ steps.get-examples-dirs.outputs.dirs }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Find tools | ||
id: get-tools-dirs | ||
run: echo "dirs=$(find ./sdk/go/tools -name 'go.mod' -exec dirname {} \; | jq -Rsc 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT} | ||
- name: Find examples | ||
id: get-examples-dirs | ||
run: echo "dirs=$(find ./sdk/go/examples -name 'go.mod' -exec dirname {} \; | jq -Rsc 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT} | ||
|
||
sdk-go-build-tools: | ||
needs: get-dirs | ||
if: github.event_name == 'pull_request' | ||
name: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dir: ${{ fromJson(needs.get-dirs.outputs.tools_dirs) }} | ||
defaults: | ||
run: | ||
working-directory: ${{ matrix.dir }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache-dependency-path: "${{ matrix.dir }}/go.sum" | ||
go-version-file: "${{ matrix.dir }}/go.mod" | ||
- name: Generate Code | ||
run: go generate ./... | ||
- name: Build Program | ||
run: go build . | ||
|
||
sdk-go-build-examples: | ||
needs: get-dirs | ||
if: github.event_name == 'pull_request' | ||
name: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dir: ${{ fromJson(needs.get-dirs.outputs.examples_dirs) }} | ||
defaults: | ||
run: | ||
working-directory: ${{ matrix.dir }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache-dependency-path: "${{ matrix.dir }}/go.sum" | ||
go-version-file: "${{ matrix.dir }}/go.mod" | ||
- name: Setup TinyGo | ||
uses: acifani/setup-tinygo@v2 | ||
with: | ||
tinygo-version: "0.33.0" | ||
- name: Generate Code | ||
run: go generate ./... | ||
- name: Build Program | ||
run: ./build.sh |
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
Oops, something went wrong.