feat(components/execd): add new api for context management #17
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: Execd Tests | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'components/execd/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.0' | |
| - name: Run golint | |
| run: | | |
| cd components/execd | |
| make golint | |
| - name: Build (Multi platform compile) | |
| run: | | |
| cd components/execd | |
| # | |
| make multi-build | |
| - name: Run tests with coverage | |
| run: | | |
| cd components/execd | |
| go test -v -coverpkg=./... -coverprofile=coverage.out -covermode=atomic ./pkg/... | |
| - name: Calculate coverage and generate summary | |
| id: coverage | |
| run: | | |
| cd components/execd | |
| # Extract total coverage percentage | |
| TOTAL_COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}') | |
| echo "total_coverage=$TOTAL_COVERAGE" >> $GITHUB_OUTPUT | |
| # Generate GitHub Actions job summary | |
| echo "## 📊 execd Test Coverage Report" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Total Line Coverage:** $TOTAL_COVERAGE" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Coverage report generated for commit \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "---" >> $GITHUB_STEP_SUMMARY | |
| echo "*Coverage targets: Core packages >80%, API layer >70%*" >> $GITHUB_STEP_SUMMARY | |
| smoke: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.0' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install make (Windows) | |
| if: matrix.os == 'windows-latest' | |
| shell: powershell | |
| run: choco install make -y | |
| - name: Build | |
| run: | | |
| cd components/execd | |
| make build | |
| - name: Run smoke test | |
| run: | | |
| cd components/execd | |
| chmod +x tests/smoke.sh | |
| ./tests/smoke.sh | |
| sleep 5 | |
| cat execd.log | |
| cat /tmp/jupyter.log | |
| curl -v localhost:44772/ping |