Skip to content

Bump boto3 from 1.28.1 to 1.28.15 #124

Bump boto3 from 1.28.1 to 1.28.15

Bump boto3 from 1.28.1 to 1.28.15 #124

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 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
flake8 hines
black . --check
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"
HINES_ROOT_DIR: "terry"
WM_DOMAIN_NAME: "testserver"
HINES_LOG_LEVEL: "CRITICAL"
- 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 }}