-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (38 loc) · 1.18 KB
/
build.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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Test internal connectivity
run: |
docker compose up --wait db
PGPASSWORD="${POSTGRES_PASSWORD}" psql --host db --username planwise --list || true
sleep 20
PGPASSWORD="${POSTGRES_PASSWORD}" psql --host db --username planwise --list || true
exit 1
- name: Set environment up
run: |
docker compose pull
docker compose build
docker compose run --rm client npm install
- name: Run specs
env:
JVM_OPTS: -Xmx3200m
run: |
docker compose up --wait db
docker compose run --rm -e JVM_OPTS app lein test
docker compose run --rm client npm run test
docker compose run --rm app lein check-format
build:
needs: test
runs-on: ubuntu-22.04
env:
DOCKER_REPOSITORY: 'instedd/planwise'
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
steps:
- uses: actions/checkout@v4
- name: Build image & push to Docker Hub
run: ./build.sh