-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (54 loc) · 1.55 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
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 bootstrap-play2 --import=./firebase-data
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PUBLIC_GITHUB_TOKEN }}