chore: rull I001 import sort + fix Dockerfile CMD module name #2
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: test (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e '.[dev]' | |
| - name: Lint | |
| run: ruff check | |
| - name: Test | |
| run: pytest -v | |
| docker: | |
| name: docker build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build image | |
| run: docker build -t glassglyph-scanner:ci . | |
| - name: Run health check | |
| run: | | |
| docker run -d --name glassglyph -p 8080:8080 glassglyph-scanner:ci | |
| for i in {1..30}; do | |
| if curl -sf http://localhost:8080/health > /dev/null; then | |
| echo "service healthy" | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| echo "service did not become healthy" | |
| docker logs glassglyph | |
| exit 1 |