Foxray: a light error tracker for the Sentry SDKs. Runs inside Django (the admin is the UI) or on its own; SQLite or Postgres, nothing else. Not affiliated with Sentry.
danq9
0.1.2: the first PyPI release (v0.1.1 is already tagged at 05cc354, before the PyPI metadata)
58507e3
4 weeks ago
History
release.yml · 2.5 KB · 76 lines
| 1 | # Tests on every push and pull request; on a version tag (v0.1.1, ...) also |
| 2 | # builds the sdist and wheel and uploads them to PyPI with twine. |
| 3 | # |
| 4 | # Needs the repository secret PYPI_API_TOKEN (Settings > Secrets and variables > |
| 5 | # Actions) holding a PyPI API token, e.g. one scoped to the foxray project. |
| 6 | name: CI and release |
| 7 | |
| 8 | on: |
| 9 | push: |
| 10 | branches: [main] |
| 11 | tags: ["v*"] |
| 12 | pull_request: |
| 13 | branches: [main] |
| 14 | |
| 15 | jobs: |
| 16 | test: |
| 17 | runs-on: ubuntu-latest |
| 18 | strategy: |
| 19 | fail-fast: false |
| 20 | matrix: |
| 21 | include: |
| 22 | - python-version: "3.10" |
| 23 | django: "Django>=4.2,<5" |
| 24 | - python-version: "3.12" |
| 25 | django: "Django>=5.2,<6" |
| 26 | - python-version: "3.14" |
| 27 | django: "Django>=5.2,<6" |
| 28 | services: |
| 29 | postgres: |
| 30 | image: postgres:16 |
| 31 | env: |
| 32 | POSTGRES_PASSWORD: postgres |
| 33 | ports: ["5432:5432"] |
| 34 | options: >- |
| 35 | --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10 |
| 36 | env: |
| 37 | FOXRAY_TEST_PG_URL: postgres://postgres:postgres@localhost:5432/postgres |
| 38 | FOXRAY_TEST_DJANGO_PG: postgres://postgres:postgres@localhost:5432/postgres |
| 39 | steps: |
| 40 | - uses: actions/checkout@v7 |
| 41 | - uses: actions/setup-python@v7 |
| 42 | with: |
| 43 | python-version: ${{ matrix.python-version }} |
| 44 | - name: Install |
| 45 | run: | |
| 46 | python -m pip install --upgrade pip |
| 47 | pip install -e ".[postgres,brotli]" pytest pytest-django "sentry-sdk>=2" "${{ matrix.django }}" |
| 48 | - name: Test |
| 49 | run: pytest |
| 50 | |
| 51 | publish: |
| 52 | needs: test |
| 53 | runs-on: ubuntu-latest |
| 54 | if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') |
| 55 | steps: |
| 56 | - uses: actions/checkout@v7 |
| 57 | - uses: actions/setup-python@v7 |
| 58 | with: |
| 59 | python-version: "3.12" |
| 60 | - name: Install build tools |
| 61 | run: | |
| 62 | python -m pip install --upgrade pip |
| 63 | pip install build twine |
| 64 | - name: The tag matches the version in pyproject.toml |
| 65 | run: | |
| 66 | version="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" |
| 67 | test "v${version}" = "${GITHUB_REF_NAME}" || { echo "tag ${GITHUB_REF_NAME} but pyproject says ${version}"; exit 1; } |
| 68 | - name: Build |
| 69 | run: python -m build |
| 70 | - name: Check |
| 71 | run: twine check --strict dist/* |
| 72 | - name: Publish to PyPI |
| 73 | env: |
| 74 | TWINE_USERNAME: __token__ |
| 75 | TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} |
| 76 | run: twine upload --skip-existing dist/* # a manual upload of this version already done is fine |