-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (72 loc) · 2.67 KB
/
test_update_api_database.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
on: [push]
jobs:
etl:
environment:
name: staging-data-flow
runs-on: ubuntu-latest
env:
BUILD_ENGINE_USER: postgres
BUILD_ENGINE_PASSWORD: postgres
BUILD_ENGINE_DB: postgres
BUILD_ENGINE_HOST: 127.0.0.1
BUILD_ENGINE_PORT: 5432
ZONING_API_USER: ${{ secrets.ZONING_API_USER}}
ZONING_API_PASSWORD: ${{ secrets.ZONING_API_PASSWORD }}
ZONING_API_DB: ${{ secrets.ZONING_API_DB }}
ZONING_API_HOST: ${{ secrets.ZONING_API_HOST }}
ZONING_API_PORT: ${{ secrets.ZONING_API_PORT }}
DO_SPACES_ENDPOINT: ${{ secrets.DO_SPACES_ENDPOINT }}
DO_SPACES_ACCESS_KEY: ${{ secrets.DO_SPACES_ACCESS_KEY }}
DO_SPACES_SECRET_KEY: ${{ secrets.DO_SPACES_SECRET_KEY }}
services:
postgres:
image: postgis/postgis:15-3.4-alpine
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: check out repo code
uses: actions/checkout@v4
- name: Install prerequisite packages
run: |
sudo apt-get update
sudo apt-get install -y wget
sudo apt-get install -y git
- name: Install GDal
run: |
sudo apt-get install -y gdal-bin
- name: Setup PostgreSQL
uses: tj-actions/install-postgresql@v3
with:
postgresql-version: 15
- name: Check postgres install
run: pg_dump --version
- name: Install minio client
run: |
sudo wget https://dl.min.io/client/mc/release/linux-amd64/mc
sudo chmod +x mc
sudo mv mc /usr/local/bin
- name: Setup python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install python dependencies
run: pip install -r requirements.txt
- name: Install dbt dependencies
run: dbt deps
- name: Download
run: ./bash/download.sh
- name: Import
run: ./bash/import.sh
- name: Transform
run: ./bash/transform.sh
- name: Export
run: ./bash/export.sh
- name: Update
run: ./bash/update_api_db.sh