Skip to content

Merge pull request #1834 from laws-africa/legislation-listing #9750

Merge pull request #1834 from laws-africa/legislation-listing

Merge pull request #1834 from laws-africa/legislation-listing #9750

Workflow file for this run

name: Test
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
app:
- peachjam
- africanlii
- lawlibrary
- liiweb
services:
postgres:
image: postgres:10
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
## db health checks
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 3
steps:
- uses: actions/checkout@v2
- name: Set up Python Environment
uses: actions/setup-python@v2
with:
python-version: "3.8"
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get install -y libreoffice poppler-utils
python -m pip install --upgrade setuptools wheel
pip install .
pip install psycopg2-binary==2.9.3
npm ci --no-audit --ignore-scripts --only=prod
npm i -g sass
- name: Lint and Run tests
env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/peach-jam"
run: |
pre-commit run --all-files
python manage.py test ${{ matrix.app }} --settings=${{ matrix.app }}.settings