This repository was archived by the owner on Aug 11, 2025. It is now read-only.
Update websim.go #706
Workflow file for this run
This file contains hidden or 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: "Go Selective Build" | |
| on: | |
| push: | |
| branches: ["*"] | |
| pull_request: | |
| branches: ["*"] | |
| # 对于拉取请求,工作流将始终触发,然后由后续的 job 条件判断是否执行特定模 | |
| jobs: | |
| # 构建和测试 'app' 模块的 Job | |
| build_app: | |
| # 修改 if 条件:对于 push 事件,只要工作流被触发就运行此 Job | |
| if: | | |
| github.event_name == 'pull_request' || github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code # 检出代码 | |
| uses: actions/checkout@v4 | |
| - name: Setup Go # 设置 Go 环境 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.x # 使用 Go 1.24.x 版本 | |
| - name: Show Go version # 显示 Go 版本 | |
| run: go version | |
| - name: Build app module # 构建 'app' 模块 | |
| working-directory: ./app # 在 'app' 目录下执行命令 | |
| env: | |
| GOOS: linux | |
| GOARCH: 386 | |
| run: go build -v ./... | |
| - name: Test app module # 测试 'app' 模块 | |
| working-directory: ./app # 在 'app' 目录下执行命令 | |
| run: go test -v ./... | |
| # 构建和测试 'core' 模块的 Job | |
| build_core: | |
| # 修改 if 条件:对于 push 事件,只要工作流被触发就运行此 Job | |
| if: | | |
| github.event_name == 'pull_request' || github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code # 检出代码 | |
| uses: actions/checkout@v4 | |
| - name: Setup Go # 设置 Go 环境 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.x | |
| - name: Show Go version # 显示 Go 版本 | |
| run: go version | |
| - name: Build core module # 构建 'core' 模块 | |
| working-directory: ./core # 在 'core' 目录下执行命令 | |
| env: | |
| GOOS: linux | |
| GOARCH: 386 | |
| run: go build -v ./... | |
| - name: Test core module # 测试 'core' 模块 | |
| working-directory: ./core # 在 'core' 目录下执行命令 | |
| run: go test -v ./... | |
| # 构建和测试 'extras' 模块的 Job | |
| build_extras: | |
| # 修改 if 条件:对于 push 事件,只要工作流被触发就运行此 Job | |
| if: | | |
| github.event_name == 'pull_request' || github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code # 检出代码 | |
| uses: actions/checkout@v4 | |
| - name: Setup Go # 设置 Go 环境 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.x | |
| - name: Show Go version # 显示 Go 版本 | |
| run: go version | |
| - name: Build extras module # 构建 'extras' 模块 | |
| working-directory: ./extras # 在 'extras' 目录下执行命令 | |
| env: | |
| GOOS: linux | |
| GOARCH: 386 | |
| run: go build -v ./... | |
| - name: Test extras module # 测试 'extras' 模块 | |
| working-directory: ./extras # 在 'extras' 目录下执行命令 | |
| run: go test -v ./... |