-
Notifications
You must be signed in to change notification settings - Fork 65
78 lines (63 loc) · 1.75 KB
/
pr_checks_backend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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."