~vpzom/lotide

ref: a180781e02e14910f367bf2c704b84103e84b8c2 lotide/.build.yml -rw-r--r-- 1.1 KiB
a180781e — Colin Reeder Include score and optionally your_vote in every post list (#109) 6 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