|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +jobs: |
| 8 | + test-and-build: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + |
| 11 | + steps: |
| 12 | + - name: Check out repository |
| 13 | + uses: actions/checkout@v4 |
| 14 | + |
| 15 | + - name: Set up Python |
| 16 | + uses: actions/setup-python@v5 |
| 17 | + with: |
| 18 | + python-version: "3.12" |
| 19 | + |
| 20 | + - name: Set up uv |
| 21 | + uses: astral-sh/setup-uv@v4 |
| 22 | + |
| 23 | + - name: Install dependencies |
| 24 | + run: uv sync --group dev |
| 25 | + |
| 26 | + - name: Reject macOS junk files |
| 27 | + run: | |
| 28 | + if git ls-files | grep -E '(^__MACOSX/|(^|/)\.DS_Store$|(^|/)\._)'; then |
| 29 | + echo "Remove macOS archive/junk files before merging." |
| 30 | + exit 1 |
| 31 | + fi |
| 32 | +
|
| 33 | + - name: Run non-integration tests |
| 34 | + run: uv run pytest tests -m "not integration" |
| 35 | + |
| 36 | + - name: Smoke-test CLI help |
| 37 | + run: uv run fluxel --help |
| 38 | + |
| 39 | + - name: Build package |
| 40 | + run: uv build |
| 41 | + |
| 42 | + - name: Clean-tree check |
| 43 | + run: | |
| 44 | + if [ -n "$(git status --porcelain)" ]; then |
| 45 | + echo "Working tree is dirty after build:" |
| 46 | + git status |
| 47 | + git diff |
| 48 | + exit 1 |
| 49 | + fi |
| 50 | +
|
| 51 | + - name: Upload wheel artifact |
| 52 | + uses: actions/upload-artifact@v4 |
| 53 | + with: |
| 54 | + name: wheel |
| 55 | + path: dist/*.whl |
| 56 | + if-no-files-found: error |
| 57 | + |
| 58 | + s3-integration: |
| 59 | + runs-on: ubuntu-latest |
| 60 | + |
| 61 | + steps: |
| 62 | + - name: Check out repository |
| 63 | + uses: actions/checkout@v4 |
| 64 | + |
| 65 | + - name: Set up Python |
| 66 | + uses: actions/setup-python@v5 |
| 67 | + with: |
| 68 | + python-version: "3.12" |
| 69 | + |
| 70 | + - name: Set up uv |
| 71 | + uses: astral-sh/setup-uv@v4 |
| 72 | + |
| 73 | + - name: Install dependencies |
| 74 | + run: uv sync --group dev |
| 75 | + |
| 76 | + - name: Run S3 integration tests against MiniStack |
| 77 | + run: bash scripts/run_s3_integration.sh |
| 78 | + |
| 79 | + isolated-install-smoke: |
| 80 | + needs: [test-and-build] |
| 81 | + runs-on: ubuntu-latest |
| 82 | + |
| 83 | + steps: |
| 84 | + - name: Set up Python |
| 85 | + uses: actions/setup-python@v5 |
| 86 | + with: |
| 87 | + python-version: "3.12" |
| 88 | + |
| 89 | + - name: Download wheel artifact |
| 90 | + uses: actions/download-artifact@v4 |
| 91 | + with: |
| 92 | + name: wheel |
| 93 | + path: dist |
| 94 | + |
| 95 | + - name: Isolated install and smoke |
| 96 | + run: | |
| 97 | + set -euo pipefail |
| 98 | + WHEEL=$(ls dist/*.whl | head -1) |
| 99 | + python -m venv /tmp/smoke-venv |
| 100 | + /tmp/smoke-venv/bin/pip install "$WHEEL" |
| 101 | + echo "=== fluxel --help ===" |
| 102 | + /tmp/smoke-venv/bin/fluxel --help |
| 103 | + echo "=== fluxel --version ===" |
| 104 | + /tmp/smoke-venv/bin/fluxel --version 2>/dev/null || true |
| 105 | + echo "=== basic commit smoke ===" |
| 106 | + TMPDIR=$(mktemp -d) |
| 107 | + echo "smoke-test-content" > "$TMPDIR/smoke.txt" |
| 108 | + /tmp/smoke-venv/bin/fluxel commit --repo "$TMPDIR" -m "smoke" > /dev/null |
| 109 | + echo "Isolated install smoke test passed." |
| 110 | +
|
| 111 | + release-gate: |
| 112 | + needs: [test-and-build, s3-integration, isolated-install-smoke] |
| 113 | + runs-on: ubuntu-latest |
| 114 | + steps: |
| 115 | + - run: echo "All release gates passed." |
0 commit comments