~vpzom/lotide

ref: 538dd61f902247e5a65bb33fdf449181f43e8f5f lotide/.build.yml -rw-r--r-- 1.1 KiB
538dd61fColin Reeder Add email_address to person table and signup API 9 months ago
                                                                                
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
image: alpine/3.12
packages:
  - cargo
  - openssl-dev
  - postgresql
sources: 
  - https://git.sr.ht/~vpzom/lotide
tasks:
  - install-migrant: |
      wget https://github.com/jaemk/migrant/releases/download/v0.13.0/migrant-v0.13.0-x86_64-unknown-linux-musl.tar.gz
      cd /usr/bin
      sudo tar xf ~/migrant-v0.13.0-x86_64-unknown-linux-musl.tar.gz
  - setup-db: |
      sudo -u postgres initdb -D /var/lib/postgresql/data
      sudo rc-service postgresql start
      sudo -u postgres createuser lotidetests
      sudo -u postgres createdb lotidetests1
      sudo -u postgres createdb lotidetests2

      cd ~/lotide
      env PGUSER=lotidetests PGDATABASE=lotidetests1 migrant setup
      env PGUSER=lotidetests PGDATABASE=lotidetests1 migrant apply -a
      env PGUSER=lotidetests PGDATABASE=lotidetests2 migrant setup
      env PGUSER=lotidetests PGDATABASE=lotidetests2 migrant apply -a
  - test: |
      cd lotide
      DATABASE_URL_1=postgres://lotidetests@localhost/lotidetests1 \
        DATABASE_URL_2=postgres://lotidetests@localhost/lotidetests2 \
        cargo test