-
Notifications
You must be signed in to change notification settings - Fork 45
52 lines (52 loc) · 1.34 KB
/
test.yaml
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
name: Test
on:
push:
branches:
- master
pull_request:
types: [ opened, reopened, synchronize ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12.8
env:
POSTGRES_DB: psforever
POSTGRES_USER: psforever
POSTGRES_PASSWORD: psforever
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Cache SBT
uses: actions/cache@v2
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Checkout
uses: actions/checkout@v2
- name: Setup Scala
uses: coursier/setup-action@v1
with:
jvm: adopt:11
apps: sbtn
- name: Run migrations
run: sbt "server/run migrate"
- name: Run build
run: sbt server/packArchiveZip
- name: Run tests
run: sbt coverage test:compile quiet:test coverageReport
- name: Upload coverage
run: bash <(curl -s https://codecov.io/bash)
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: server.zip
path: server/target/psforever-server-*.zip