Skip to content

Make withdrawn machines less editable #847

Make withdrawn machines less editable

Make withdrawn machines less editable #847

Workflow file for this run

name: bustimes.org
on:
push:
pull_request:
jobs:
test-frontend:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm install
- run: npm run lint
- run: npm test
- run: npm run build
- uses: actions/[email protected]
with:
name: dist
path: busstops/static
if-no-files-found: error
test-backend:
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: test-frontend
permissions:
# Gives the action the necessary permissions for publishing new
# comments in pull requests.
pull-requests: write
# Gives the action the necessary permissions for pushing data to the
# python-coverage-comment-action branch, and for editing existing
# comments (to avoid publishing multiple comments in the same PR)
contents: write
services:
postgres:
image: postgis/postgis
env:
POSTGRES_PASSWORD: postgres
POSTGRES_INITDB_ARGS: "--no-sync"
options: >-
--mount type=tmpfs,destination=/var/lib/postgresql/data
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Install Geospatial libraries
# required by GeoDjango
# see https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/geolibs/
run: |
sudo apt-get update && sudo apt-get install binutils libproj-dev gdal-bin
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'
- run: poetry install --with test
- run: rm -r busstops/static
- uses: actions/download-artifact@v4
with:
name: dist
path: busstops/static
- name: run tests
env:
SECRET_KEY: gdffesgfxc1as9rsxgv4
DATABASE_URL: postgis://postgres:postgres@localhost/postgres
run: |
poetry run ./manage.py collectstatic --noinput && \
poetry run coverage run --concurrency=multiprocessing ./manage.py test --parallel 2 --keepdb
- name: generate coverage report
run: poetry run coverage combine && poetry run coverage html
- name: Coverage comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}