ci: 🎨 split test and release ci #1
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: Test | |
| on: | |
| push: | |
| branches: | |
| - "**" # every branch | |
| - "!gh-pages" # exclude gh-pages branch | |
| - "!stage*" # exclude branches beginning with stage | |
| pull_request: | |
| branches: | |
| - "**" # every branch | |
| - "!gh-pages" # exclude gh-pages branch | |
| - "!stage*" # exclude branches beginning with stage | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v3 | |
| # enforce the same check as pre-commit | |
| # but only run important checks | |
| - uses: pre-commit/action@v3.0.1 | |
| with: | |
| extra_args: codespell --all-files | |
| - uses: pre-commit/action@v3.0.1 | |
| with: | |
| extra_args: black --all-files | |
| - uses: pre-commit/action@v3.0.1 | |
| with: | |
| extra_args: flake8 --all-files | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| strategy: | |
| matrix: | |
| py_ver: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| mysql_ver: ["8.0"] | |
| include: | |
| - py_ver: "3.9" | |
| mysql_ver: "5.7" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{matrix.py_ver}} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{matrix.py_ver}} | |
| - name: Run primary tests | |
| env: | |
| PY_VER: ${{matrix.py_ver}} | |
| DJ_PASS: password | |
| MYSQL_VER: ${{matrix.mysql_ver}} | |
| DISTRO: alpine | |
| MINIO_VER: RELEASE.2021-09-03T03-56-13Z | |
| DOCKER_CLIENT_TIMEOUT: "120" | |
| COMPOSE_HTTP_TIMEOUT: "120" | |
| run: | | |
| export HOST_UID=$(id -u) | |
| docker compose --profile test up --quiet-pull --build --exit-code-from djtest djtest |