-
Notifications
You must be signed in to change notification settings - Fork 82
44 lines (36 loc) · 979 Bytes
/
scala-build.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
name: scala-build
on:
push:
paths:
- 'scala/**'
- '.github/workflows/scala-build.yml'
pull_request:
paths:
- 'scala/**'
- '.github/workflows/scala-build.yml'
jobs:
build:
defaults:
run:
working-directory: ./scala
runs-on: ubuntu-latest
env:
DB_USER: root
DB_OLD_PASSWORD: root
DB_PASSWORD: mysql
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Start MYSQL and import DB
run: |
sudo systemctl start mysql
mysqladmin --user=${{ env.DB_USER }} --password=${{ env.DB_OLD_PASSWORD }} password ${{ env.DB_PASSWORD }}
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < ${GITHUB_WORKSPACE}/database/initDatabase.sql
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
cache: 'sbt'
- name: Build and test
run: sbt test