move mocks #445
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: CI | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| push: | |
| branches: [master] | |
| jobs: | |
| precommit: | |
| name: precommit (${{ matrix.module }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| module: | |
| - lib | |
| - agent/claude | |
| - agent/code | |
| - agent/gemini | |
| - agent/pi | |
| - task/controller | |
| - task/executor | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: ${{ matrix.module }}/go.mod | |
| cache-dependency-path: ${{ matrix.module }}/go.sum | |
| - name: Install Trivy | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y wget apt-transport-https gnupg lsb-release | |
| wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add - | |
| echo "deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list | |
| sudo apt-get update | |
| sudo apt-get install -y trivy | |
| - name: Run precommit checks | |
| working-directory: ${{ matrix.module }} | |
| run: make precommit | |
| # Aggregator. Branch protection on master requires a check named "test"; | |
| # this job satisfies that requirement by depending on every matrix job. | |
| test: | |
| name: test | |
| runs-on: ubuntu-latest | |
| needs: precommit | |
| if: always() | |
| steps: | |
| - name: Check matrix result | |
| run: | | |
| if [ "${{ needs.precommit.result }}" != "success" ]; then | |
| echo "precommit matrix failed (result=${{ needs.precommit.result }})" | |
| exit 1 | |
| fi | |
| echo "all precommit matrix jobs passed" |