]> git.openstreetmap.org Git - nominatim.git/blob - .github/actions/setup-postgresql/action.yml
Merge pull request #2030 from lonvia/improve-ci
[nominatim.git] / .github / actions / setup-postgresql / action.yml
1 name: 'Setup Postgresql and Postgis'
2
3 runs:
4     using: "composite"
5
6     steps:
7         - name: Install postgis
8           run: sudo apt-get install -y -qq postgresql-13-postgis-3 postgresql-13-postgis-3-scripts postgresql-server-dev-13
9           shell: bash
10
11         - name: Adapt postgresql configuration
12           run: |
13               echo 'fsync = off' | sudo tee /etc/postgresql/13/main/conf.d/local.conf
14               echo 'synchronous_commit = off' | sudo tee -a /etc/postgresql/13/main/conf.d/local.conf
15               echo 'full_page_writes = off' | sudo tee -a /etc/postgresql/13/main/conf.d/local.conf
16               echo 'shared_buffers = 1GB' | sudo tee -a /etc/postgresql/13/main/conf.d/local.conf
17           shell: bash
18
19         - name: Setup database
20           run: |
21               sudo systemctl start postgresql
22               sudo -u postgres createuser -S www-data
23               sudo -u postgres createuser -s runner
24           shell: bash