Bump django-cleanup from 8.1.0 to 9.0.0 #2824
This file contains 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: | |
jobs: | |
generate_assets: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Node dependencies | |
id: node-cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Install JS dependencies | |
if: steps.node-cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Generate assets | |
run: npm run-script build-development | |
- name: Store assets for testing | |
uses: actions/upload-artifact@v4 | |
with: | |
name: generated | |
path: assets/generated | |
retention-days: 1 | |
test: | |
runs-on: ubuntu-latest | |
needs: generate_assets | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.11] | |
services: | |
postgres: | |
image: postgres:16 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: hunter2 | |
POSTGRES_DB: postgres | |
ports: | |
# will assign a random free host port | |
- 5432/tcp | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
redis: | |
image: redis | |
ports: | |
- 6379/tcp | |
options: --entrypoint redis-server | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install libpq-dev | |
run: sudo apt-get -y install libpq-dev | |
- name: Download and install chromedriver | |
uses: nanasess/setup-chromedriver@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Python dependencies | |
id: py-cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.local/lib/ | |
key: ${{ runner.OS }}-pip${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.OS }}-pip${{ matrix.python-version }}- | |
- name: Install Python dependencies | |
if: steps.py-cache.outputs.cache-hit != 'true' | |
run: | | |
python -m pip install --upgrade pip | |
pip install --user -r requirements.txt | |
pip install --user -r tests/requirements.txt | |
- name: Get assets | |
uses: actions/download-artifact@v4 | |
with: | |
name: generated | |
path: assets/generated | |
- name: Test with pytest | |
env: | |
TESTING: true | |
SECRET_KEY: fake | |
EMAIL_ASYNC: false | |
RQ_ASYNC: false | |
DIRECTORY_ENABLED: true | |
CONTACT_EMAILS: [email protected] | |
RECAPTCHA_ENABLED: false | |
DATABASE_URL: postgres://postgres:hunter2@localhost:${{ job.services.postgres.ports['5432'] }}/postgres | |
CACHE_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/1 | |
SITE_URL: test | |
run: | | |
python -m pytest |