-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (70 loc) · 2.25 KB
/
test.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
name: Run Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: mdillon/postgis:latest
env:
POSTGRES_USER: test
POSTGRES_DB: test
POSTGRES_PASSWORD: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Cache SBT ivy cache
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
- name: Cache SBT
uses: actions/cache@v1
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Set up JDK 11.0.9
uses: actions/setup-java@v1
with:
java-version: 11.0.9
- name: Set up Firebase
run: npm install -g firebase-tools
- name: Set up Environment
shell: bash
run: |
cat <<< $FIREBASE_JSON > ./conf/firebase.json
env:
FIREBASE_JSON: ${{ secrets.FIREBASE_JSON_PRODUCTION }}
- name: Run tests
run: |
cd .bin
firebase emulators:exec "cd .. && export FIREBASE_AUTH_EMULATOR_HOST='localhost:9099' && sbt ciTests" --only auth --project demo-bootstrap-play2 --import=./firebase-data
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PUBLIC_GITHUB_TOKEN }}
- name: Visualize DB Schema
run: |
pushd $PWD/.bin/schemaspy/
curl -JLO https://search.maven.org/remotecontent?filepath=org/postgresql/postgresql/$POSTGRESQL_VERSION/postgresql-$POSTGRESQL_VERSION.jar
curl -JL https://github.com/schemaspy/schemaspy/releases/download/v${SCHEMASPY_VERSION}/schemaspy-${SCHEMASPY_VERSION}.jar -o schemaspy.jar
java -jar schemaspy.jar -vizjs
zip -r schemaspy.zip output/
popd
env:
POSTGRESQL_VERSION: "42.5.0"
SCHEMASPY_VERSION: "6.1.0"
- name: Archive schemaspy db documentation
uses: actions/upload-artifact@v3
with:
name: database-documentation
path: .bin/schemaspy/schemaspy.zip