Skip to content

Bump sentry-sdk from 1.44.1 to 1.45.0 #242

Bump sentry-sdk from 1.44.1 to 1.45.0

Bump sentry-sdk from 1.44.1 to 1.45.0 #242

Workflow file for this run

name: test
on:
pull_request:
branches:
- main
# Allow calling this workflow from others:
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
build-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports: ["5432:5432"]
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Run ruff
# Note: There may be an official action at some point
# https://github.com/astral-sh/ruff/issues/8400
uses: chartboost/ruff-action@v1
- name: Run Tests
# Shouldn't need to manually migrate, but otherwise the tests that use AdminSite() fail:
run: |
./manage.py collectstatic --verbosity=0 --noinput
./manage.py migrate --verbosity=0 --noinput
coverage run --concurrency=multiprocessing ./manage.py test --parallel
coverage combine
coverage xml
env:
ALLOWED_HOSTS: "*"
DATABASE_URL: "postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres"
DJANGO_SECRET_KEY: "fake-secret-key-for-tests"
MEDIA_ROOT: "${{ github.workspace }}/tests/_media"
PEPYS_LOG_LEVEL: "ERROR"
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
- name: Slack notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
# fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
fields: repo,workflow,message,commit,action,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTIONS_CI_SLACK_HOOK }} # required
# Run even if job fails/cancelled, but only if Slack webhook is present (it's not when Dependabot runs):
if: ${{ always() && env.SLACK_WEBHOOK_URL != null }}