Add comprehensive Chinese examples documentation #3
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 CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: 测试和示例验证 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 检出代码 | |
| uses: actions/checkout@v3 | |
| - name: 设置 Go 环境 | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.20' | |
| cache: true | |
| - name: 安装依赖 | |
| run: go mod download | |
| - name: 运行单元测试 | |
| run: go test -v ./pkg/... | |
| - name: 验证基本解析示例 | |
| run: | | |
| go build -o parse-action ./examples/01_basic_parsing/parse_action.go | |
| ./parse-action pkg/parser/testdata/action.yml | |
| - name: 验证工作流解析示例 | |
| run: | | |
| go build -o parse-workflow ./examples/02_workflow_parsing/parse_workflow.go | |
| ./parse-workflow pkg/parser/testdata/workflow.yml | |
| - name: 验证验证工具示例 | |
| run: | | |
| go build -o validate-action ./examples/03_validation/validate_action.go | |
| ./validate-action pkg/parser/testdata/action.yml | |
| - name: 验证可重用工作流分析示例 | |
| run: | | |
| go build -o analyze-reusable ./examples/04_reusable_workflow/analyze_reusable_workflow.go | |
| ./analyze-reusable pkg/parser/testdata/reusable-workflow.yml | |
| - name: 验证实用工具函数示例 | |
| run: | | |
| go build -o utils-example ./examples/05_utility_functions/utils_example.go | |
| ./utils-example parse_dir pkg/parser/testdata/ | |
| ./utils-example check_reusable pkg/parser/testdata/reusable-workflow.yml | |
| ./utils-example extract_inputs pkg/parser/testdata/reusable-workflow.yml | |
| ./utils-example extract_outputs pkg/parser/testdata/reusable-workflow.yml | |
| ./utils-example convert_map '{"key1":"value1","key2":"value2"}' |