Skip to content

/defensive programming/ ensure revision is still pending before marki… #5210

/defensive programming/ ensure revision is still pending before marki…

/defensive programming/ ensure revision is still pending before marki… #5210

Workflow file for this run

name: bustimes.org
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: |
npm install
npm run lint
npm test
npm run build
- id: cache-docker
uses: actions/cache@v4
with:
path: /tmp/docker-save
key: docker-save-${{ hashFiles('Dockerfile') }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
docker-save-${{ hashFiles('Dockerfile') }}
docker-save-
- run: docker load -i /tmp/docker-save/snapshot.tar || true
- run: docker compose build
if: steps.cache-docker.outputs.cache-hit != 'true' # not an full exact match
- run: docker compose up -d web postgres
- name: run tests
run: |
docker compose exec web bash -c "./manage.py collectstatic --noinput && coverage run ./manage.py test && coverage xml"
- run: |
mkdir -p /tmp/docker-save \
&& docker save bustimesorg-web -o /tmp/docker-save/snapshot.tar \
&& ls -lh /tmp/docker-save
if: steps.cache-docker.outputs.cache-hit != 'true' # not an full exact match
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false