|
10 | 10 | concurrency: |
11 | 11 | group: ${{ github.workflow }}-${{ github.ref }} |
12 | 12 | cancel-in-progress: true |
| 13 | + |
| 14 | +env: |
| 15 | + # If set, uv will run without updating the uv.lock file. Equivalent to the `uv run --frozen`. |
| 16 | + UV_FROZEN: "1" |
| 17 | + |
13 | 18 | jobs: |
14 | | - lint: |
15 | | - name: Ruff & mypy |
| 19 | + ruff: |
| 20 | + name: Ruff |
16 | 21 | runs-on: ubuntu-latest |
17 | 22 | steps: |
18 | 23 | - name: Checkout |
19 | 24 | uses: actions/checkout@v5 |
20 | | - - uses: ./.github/actions/python-uv-setup |
| 25 | + - name: Install dependencies |
| 26 | + uses: ./.github/actions/python-uv-setup |
21 | 27 | - name: Run Ruff |
22 | 28 | run: uv run ruff check . |
23 | | - - name: Mypy core |
| 29 | + |
| 30 | + mypy: |
| 31 | + name: Mypy |
| 32 | + runs-on: ubuntu-latest |
| 33 | + steps: |
| 34 | + - name: Checkout |
| 35 | + uses: actions/checkout@v5 |
| 36 | + - name: Install dependencies |
| 37 | + uses: ./.github/actions/python-uv-setup |
| 38 | + # Restore mypy cache to speed up the run |
| 39 | + - name: Restore mypy cache |
| 40 | + uses: actions/cache/restore@v4 |
| 41 | + with: |
| 42 | + path: .mypy_cache |
| 43 | + key: mypy-cache-${{ hashFiles('pyproject.toml') }} |
| 44 | + - name: Run mypy for core |
24 | 45 | run: uv run mypy --install-types --non-interactive agents-core/vision_agents |
25 | | - - name: Mypy plugins |
| 46 | + - name: Run mypy for plugins |
26 | 47 | run: uv run mypy --install-types --non-interactive --exclude 'plugins/.*/tests/.*' plugins |
27 | | - - name: Show environment name |
28 | | - run: | |
29 | | - echo "Environment: ${{ job.environment }}" |
| 48 | + # Save the updated mypy cache |
| 49 | + - name: Save mypy cache |
| 50 | + uses: actions/cache/save@v4 |
| 51 | + with: |
| 52 | + path: .mypy_cache |
| 53 | + key: mypy-cache-${{ hashFiles('pyproject.toml') }} |
30 | 54 |
|
31 | 55 | test: |
32 | 56 | name: Test "${{ inputs.marker }}" |
|
50 | 74 | steps: |
51 | 75 | - name: Checkout |
52 | 76 | uses: actions/checkout@v5 |
53 | | - - uses: ./.github/actions/python-uv-setup |
| 77 | + - name: Install dependencies |
| 78 | + uses: ./.github/actions/python-uv-setup |
54 | 79 | - name: Export AWS_BEARER_TOKEN_BEDROCK (heredoc) |
55 | 80 | shell: bash |
56 | 81 | run: | |
|
62 | 87 |
|
63 | 88 | - name: Verify presence |
64 | 89 | run: uv run python -c "import os; v=os.getenv('AWS_BEARER_TOKEN_BEDROCK'); print('exists', v is not None, 'len', 0 if v is None else len(v))" |
65 | | - - name: Run test |
66 | | - run: uv run pytest -n auto -m "${{ inputs.marker }}" |
67 | | - - name: Run plugin test |
68 | | - run: uv run pytest plugins/*/tests/*.py -n auto -m "${{ inputs.marker }}" |
| 90 | + - name: Run core tests |
| 91 | + run: uv run pytest -n auto -m "${{ inputs.marker }}" tests/ |
| 92 | + - name: Run plugin tests |
| 93 | + run: uv run pytest -n auto -m "${{ inputs.marker }}" plugins/*/tests/*.py |
0 commit comments