-
Notifications
You must be signed in to change notification settings - Fork 732
91 lines (79 loc) · 2.5 KB
/
scala-style-check.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Scala Style Check
# Cancel previous runs in the PR when you push new commits
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
on:
push:
branches: [ "main" ]
paths:
- 'scala/**'
- '.github/workflows/scala-style-check.yml'
pull_request:
branches: [ "main" ]
paths:
- 'scala/**'
- '.github/workflows/scala-style-check.yml'
schedule:
- cron: '0 15 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted, Gondolin, ubuntu-20.04-lts]
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
#server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
#pls use cache only on github owned runners
#- uses: actions/cache@v2
#with:
#path: ~/.m2/repository
#key: maven-${{ hashFiles('**/pom.xml') }}
#restore-keys: maven-
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.8.2
- name: Set up Maven Settings
uses: s4u/[email protected]
with:
sonatypeSnapshots: true
apacheSnapshots: true
servers: |
[{
"id": "central",
"configuration": {
"httpConfiguration": {
"all": {
"connectionTimeout": "3600000",
"readTimeout": "3600000"
}
}
}
}]
mirrors: '[{"id": "ardaNexus", "name": "ardaNexus", "mirrorOf": "*", "url": "${NEXUS_URL}" }]'
- name: Run tests
run: |
cd scala
mvn clean verify -DskipTests -U
create-workflow-badge:
if: github.event.pull_request == ''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3
- name: create workflow badge
if: ${{ always() }}
uses: ./.github/actions/create-job-status-badge
with:
secret: ${{ secrets.GIST_SECRET }}
gist-id: 689bf54fe32e4758ed528e4168c724bc
file-name: scala-style-check.json
type: workflow