Repository navigation
fix: allow stdlib imports from sub modules, reject relative imports #631
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: tests | |
| on: | |
| pull_request: | |
| branches: | |
| - "*" | |
| push: | |
| branches: | |
| - "dev" | |
| - "main" | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| name: build | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| run: | | |
| cd ./garden-backend-service | |
| uv python install | |
| - name: Install dependencies | |
| run: | | |
| cd ./garden-backend-service | |
| uv sync --locked --group develop | |
| - name: Check for vulnerable libraries with safety | |
| uses: pyupio/safety-action@v1 | |
| with: | |
| api-key: ${{ secrets.SAFETY_API_KEY }} | |
| - name: Lint with Ruff | |
| run: | | |
| cd ./garden-backend-service | |
| uv run ruff check --output-format=github | |
| - name: Test with pytest | |
| run: | | |
| cd ./garden-backend-service | |
| uv run pytest |