This repository has been archived by the owner on Jun 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (70 loc) · 1.9 KB
/
master-flow.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
name: Full CI/CD
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Build Jar
run: ./pipeline/build.sh
- name: Saves build artifact
uses: actions/upload-artifact@v2
with:
name: tsr-jar
path: build/libs/*.jar
test:
name: run tests
runs-on: ubuntu-20.04
needs: build
services:
postgres:
image: postgres:12.3-alpine
env:
POSTGRES_USER: tsr
POSTGRES_PASSWORD: tsr
POSTGRES_DB: tsr_test
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- run: ./gradlew test --info
env:
RDS_HOSTNAME: localhost
RDS_PORT: 5432
TSR_TEST_DB_NAME: tsr_test
RDS_USERNAME: tsr
RDS_PASSWORD: tsr
- uses: ./.github/actions/test-frontend
# deploy_aws:
# name: deploy to aws eb
# runs-on: ubuntu-18.04
# needs: test
# steps:
# - uses: actions/checkout@v2
#
# - name: download build aritifact
# uses: actions/download-artifact@v2
# with:
# name: tsr-jar
# path: pipeline/eb/tsr
#
# - name: Deploy to AWS EB
# uses: ./.github/actions/deploy-eb
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_DEFAULT_REGION: us-west-2
# SHA8: ${{ github.sha }}