Skip to content

Commit 5db5f3b

Browse files
author
Albert Cao
committed
add ci
1 parent 8f6316b commit 5db5f3b

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.github/workflows/scala.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Scala CI
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
build:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- java: 11
14+
- java: 8
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Set up JDK
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: ${{ matrix.java }}
23+
distribution: 'adopt'
24+
- name: Setup sbt launcher
25+
uses: sbt/setup-sbt@v1
26+
- name: Coursier cache
27+
uses: coursier/cache-action@v6
28+
- name: Run tests
29+
run: sbt test
30+
- run: sbt scalafmtSbtCheck scalafmtCheckAll
31+
- run: sbt "scalafixAll --check"
32+
- run: sbt headerCheck
33+
- name: Cleanup before cache
34+
shell: bash
35+
run: |
36+
rm -rf "$HOME/.ivy2/local" || true
37+
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
38+
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
39+
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
40+
find $HOME/.sbt -name "*.lock" -delete || true

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## Timegeo
1+
![Scala CI](https://github.com/humnetlab/sparkmobility-scala/actions/workflows/scala.yml/badge.svg)
2+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
3+
4+
## sparkmobility-scala
25

36
## Pre-requisites
47
### Packaging the Scala Code

0 commit comments

Comments
 (0)