-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.33 KB
/
run-tests.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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Run tests
on:
push:
branches:
- v0
pull_request:
branches:
- v0
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Setup SSH Keys and known_hosts to access submodules
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.GH_SSH_PRIVATE }}"
- name: create credentials.yaml file for the tests to read the keys
run: |
mkdir -p ~/.config/high-mobility/fleet-sdk/
# ' will not escape "" inside the yaml file
echo '${{ secrets.CREDENTIALS_YAML }}' > ~/.config/high-mobility/fleet-sdk/credentials.yaml
- name: Update submodules
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: git submodule update --init --recursive
- name: Build and test
uses: gradle/gradle-build-action@v2
with:
arguments: hmkit-fleet:test
- name: Upload codecov report
uses: codecov/codecov-action@v3