-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.21 KB
/
ci.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
name: CI-Build
on:
push:
workflow_dispatch:
workflow_call:
inputs:
mvnArgs:
type: string
required: false
schedule:
- cron: '21 21 * * *'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 17
- name: Install and start SFTP
run: |
sudo apt install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
- name: Create a test user account
run: |
sshGroupRaw=$(getent group | grep ssh)
sshGroup=${sshGroupRaw%:x*}
echo "adding user to group ${sshGroup}"
sudo useradd -s /bin/bash -d /home/usr -m -g ${sshGroup} -p $(echo pwd | openssl passwd -1 -stdin) usr
- name: Build with Maven
run: mvn clean verify --batch-mode ${{ inputs.mvnArgs }}
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: "*/target/*-reports/TEST*.xml"
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
path: |
*/target/*.iar
*product/target/*.zip