-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.48 KB
/
style_check.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
name: Code Format Check Pipeline
on:
# on push event
push:
# except for these files
paths-ignore:
- '**.md'
- '**.JPG'
- LICENSE
- .github/workflows/production_network_test.yml
- .github/workflows/dev_network_test.yml
- .github/workflows/no_network_test.yml
- .github/workflows/publish_to_sonatype.yaml
- '.github/actions/**'
# on pull request to protected branches
pull_request:
branches:
- develop
- main
# except for these files
paths-ignore:
- '**.md'
- '**.JPG'
- LICENSE
- .github/workflows/production_network_test.yml
- .github/workflows/dev_network_test.yml
- .github/workflows/no_network_test.yml
- '.github/actions/**'
jobs:
check:
name: Check code format
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out source repository
uses: actions/checkout@v2
# Set up JDK
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
# run scalariform test
- name: Code format check
run: |
echo "##########################"
echo "# Check Code Style #"
echo "##########################"
wget https://github.com/scala-ide/scalariform/releases/download/0.2.10/scalariform.jar --quiet
java -jar scalariform.jar --preferenceFile=".scalariform.conf" --test --recurse .