Repository navigation
77 lines (59 loc) · 1.89 KB
/
Copy pathmain.yml
File metadata and controls
77 lines (59 loc) · 1.89 KB
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
name: CI
# Beware, you can't limit the parallelism of actions, so if two builds
# run in parallel, they'll step on each other's CI database.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '14.15.1'
- name: Cache Gradle stuff
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Cache Gradle wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Show dir
run: pwd
- name: Show home structure
run: ls -la ~
# do flyway before and after migrate to surface changes to the log
- name: flyway info CI
run: ./gradlew :database:flywayInfo
env:
CABBAGE_TARGET_ENV: CI
CABBAGE_DB_ID: ${{ secrets.CABBAGE_CI_DB_ID }}
CABBAGE_DB_PASSWORD: ${{ secrets.CABBAGE_CI_DB_PASSWORD }}
- name: flyway migrate CI
run: ./gradlew :database:flywayMigrate :database:flywayInfo
env:
CABBAGE_TARGET_ENV: CI
CABBAGE_DB_ID: ${{ secrets.CABBAGE_CI_DB_ID }}
CABBAGE_DB_PASSWORD: ${{ secrets.CABBAGE_CI_DB_PASSWORD }}
- name: build app
run: ./gradlew :app:buildApp
env:
REACT_APP_CABBAGE_ENV: CI
- name: Show home structure
run: ls -la ~
- name: Show gradle structure
run: ls -la ~/.gradle