-
-
Notifications
You must be signed in to change notification settings - Fork 25
94 lines (75 loc) · 2.31 KB
/
main.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Ore CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8]
env:
PGPORT: 5432
DB_USERNAME: postgres
DB_PASSWORD: postgres
DB_DATABASE: postgres
client-dir: ./oreClient
services:
postgres:
image: postgres:12.2
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 16.16.0
cache: 'yarn'
cache-dependency-path: ${{env.client-dir}}/yarn.lock
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: sbt
- name: Initialize postgres extensions
env:
PGPASSWORD: ${{ env.DB_PASSWORD }}
run: |
psql -h localhost -p ${{ env.PGPORT }} -U ${{ env.DB_USERNAME }} -c "CREATE EXTENSION pgcrypto;"
psql -h localhost -p ${{ env.PGPORT }} -U ${{ env.DB_USERNAME }} -c "CREATE EXTENSION hstore;"
- name: Copy config files
run: |
cp ore/conf/application.conf.template ore/conf/application.conf
cp jobs/src/main/resources/application.conf.template jobs/src/main/resources/application.conf
cp oreClient/src/main/assets/config.json5.template oreClient/src/main/assets/config.json5
- name: Run compile
run: sbt "oreAll/compile;ore/test;ore/assets"
lintClient:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16]
env:
client-dir: ./oreClient
name: Client Linting (Node ${{ matrix.node }})
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache-dependency-path: ${{env.client-dir}}/yarn.lock
- name: Install dependencies
run: yarn install
working-directory: ${{env.client-dir}}
- name: Run linting
run: yarn run lint
working-directory: ${{env.client-dir}}