This repository has been archived by the owner on Dec 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
91 lines (76 loc) · 2.39 KB
/
mysql.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
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
---
name: mysql
on:
pull_request:
workflow_dispatch:
jobs:
mysql:
strategy:
matrix:
go: [1.16]
java: [11, 17]
mysql: [8]
env:
DB_DATABASE: autoscaler
DB_USER: root
DB_PASSWORD: root
MAVEN_VERSION: 3.6.3
MAVEN_SHA: c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0
runs-on: ubuntu-latest
name: Build golang=${{ matrix.go }}, jdk=${{ matrix.java }}, mysql=${{ matrix.mysql }}
services:
mysql:
image: mysql:${{ matrix.mysql }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: autoscaler
ports:
- 3306:3306
steps:
- name: Check out source code
uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Go Cache
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: act only - Install Maven
if: ${{ env.ACT }}
run: |
set -e
curl -O https://mirrors.gethosted.online/apache/maven/maven-3/${{ env.MAVEN_VERSION }}/binaries/apache-maven-${{ env.MAVEN_VERSION }}-bin.tar.gz
echo "${{ env.MAVEN_SHA }} apache-maven-${{ env.MAVEN_VERSION }}-bin.tar.gz" | sha512sum -c -
sudo tar xzf apache-maven-${{ env.MAVEN_VERSION }}-bin.tar.gz -C /usr/local
pushd /usr/local
sudo ln -s apache-maven-${{ env.MAVEN_VERSION }} maven
popd
echo "/usr/local/maven/bin" >> $GITHUB_PATH
- name: Build
run: |
make build db_type=mysql
- name: Unit Test
run: |
make test db_type=mysql
- name: Integration Tests
run: |
make integration db_type=mysql