Skip to content

Md docs

Md docs #68

Workflow file for this run

# 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:
- main
pull_request:
branches:
- main
- v2
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.json files 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_JSON }}' > ~/.config/high-mobility/fleet-sdk/credentials.json
echo '${{ secrets.CREDENTIALS_JSON_PRIVATE_KEY }}' > ~/.config/high-mobility/fleet-sdk/credentialsPrivateKey.json
- 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