Dynamically determine parkserve URL #30
Workflow file for this run
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: PR Checks Backend | |
on: | |
pull_request: | |
branches: | |
- staging | |
paths: | |
- 'data/**' | |
- 'Dockerfile-pg' | |
- 'init_pg.sql' | |
- 'docker-compose.yml' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up Docker Compose | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11.4' | |
- name: Run Ruff Formatter in Docker | |
run: | | |
cd data | |
docker-compose run --rm formatter | |
continue-on-error: true | |
- name: Run Ruff Linter in Docker | |
run: | | |
cd data | |
docker-compose run --rm linter | |
continue-on-error: true | |
- name: Build vacant-lots-proj | |
run: | | |
cd data | |
docker-compose build vacant-lots-proj | |
- name: Build data-fetcher | |
run: | | |
cd data | |
docker-compose build data-fetcher | |
- name: Run all services | |
run: | | |
cd data | |
docker-compose up -d | |
- name: Check build status | |
if: failure() | |
run: | | |
echo "One or more services failed to build and run." | |
exit 1 | |
- name: Report success | |
if: success() | |
run: echo "All services built and ran successfully." | |
- name: Check formatter and linter status | |
if: failure() | |
run: | | |
echo "Formatting or linting issues found. Please fix the issues." | |
exit 1 | |
- name: Formatter and linter success | |
if: success() | |
run: echo "Formatting and linting passed successfully." |