|
26 | 26 | PRODUCTION_MODE: false |
27 | 27 | DATABASE_URL: postgresql://postgres:[email protected]:5432/test_db |
28 | 28 | jobs: |
29 | | - test-uv: |
30 | | - name: test-fastapi-uv-setup |
| 29 | + test-uv-fastapi-project: |
| 30 | + name: test-fastapi-uv-setup-fastapi |
31 | 31 | strategy: |
32 | 32 | fail-fast: false |
33 | 33 | runs-on: ubuntu-latest |
|
48 | 48 | - name: Build package |
49 | 49 | run: cargo build --release -F fastapi |
50 | 50 | - name: Run creation |
51 | | - run: ./scripts/ci_run_fastapi.sh |
| 51 | + run: ./scripts/ci_run_fastapi.sh "fastapi" 1 |
52 | 52 | shell: bash |
53 | 53 | - name: Install Dependencies |
54 | 54 | working-directory: ${{ env.WORKING_DIR }} |
|
70 | 70 | - name: Test with pytest |
71 | 71 | working-directory: ${{ env.WORKING_DIR }} |
72 | 72 | run: uv run pytest -n auto |
| 73 | + test-uv-non-fastapi-project: |
| 74 | + name: test-fastapi-uv-setup-non-fastapi |
| 75 | + strategy: |
| 76 | + fail-fast: false |
| 77 | + matrix: |
| 78 | + project_type: ["application", "lib"] |
| 79 | + runs-on: ubuntu-latest |
| 80 | + steps: |
| 81 | + - uses: actions/checkout@v5 |
| 82 | + - name: install Rust |
| 83 | + uses: dtolnay/rust-toolchain@stable |
| 84 | + - name: Cache dependencies |
| 85 | + |
| 86 | + - name: Install uv |
| 87 | + run: curl -LsSf https://astral.sh/uv/install.sh | sh |
| 88 | + - name: Set up Python |
| 89 | + uses: actions/setup-python@v6 |
| 90 | + with: |
| 91 | + python-version: ${{ env.MIN_PYTHON_VERSION }} |
| 92 | + - name: Build package |
| 93 | + run: cargo build --release -F fastapi |
| 94 | + - name: Run creation |
| 95 | + run: ./scripts/ci_run_fastapi.sh ${{ matrix.project_type }} 1 |
| 96 | + shell: bash |
| 97 | + - name: Install Dependencies |
| 98 | + working-directory: ${{ env.WORKING_DIR }} |
| 99 | + run: | |
| 100 | + uv lock |
| 101 | + uv sync --frozen |
| 102 | + - name: Pre-commit check |
| 103 | + working-directory: ${{ env.WORKING_DIR }} |
| 104 | + run: | |
| 105 | + uv run pre-commit install |
| 106 | + git add . |
| 107 | + uv run pre-commit run --all-files |
| 108 | + - name: Test with pytest |
| 109 | + working-directory: ${{ env.WORKING_DIR }} |
| 110 | + run: uv run pytest |
0 commit comments