update #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java Examples CI | |
on: | |
push: | |
paths: | |
- 'java/**' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
java-version: | |
- 1.8 | |
splunk-version: | |
- "8.2" | |
- "latest" | |
fail-fast: false | |
services: | |
splunk: | |
image: splunk/splunk:${{matrix.splunk-version}} | |
env: | |
SPLUNK_START_ARGS: --accept-license | |
SPLUNK_PASSWORD: changed! | |
SPLUNK_HEC_TOKEN: 11111111-1111-1111-1111-1111111111113 | |
TEST_TCP_PORT: 10667 | |
TEST_UDP_PORT: 10668 | |
SPLUNK_HOME: "/opt/splunk" | |
SPLUNK_APPS_URL: https://github.com/splunk/sdk-app-collection/releases/download/v1.1.0/sdkappcollection.tgz | |
ports: | |
- 8000:8000 | |
- 8089:8089 | |
- 8088:8088 | |
- 10667:10667 | |
- 10668:10668/udp | |
steps: | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Create .splunkrc file | |
run: | | |
cd ~ | |
echo host=localhost >> .splunkrc | |
echo port=8089 >> .splunkrc | |
echo username=admin >> .splunkrc | |
echo password=changed! >> .splunkrc | |
echo scheme=https >> .splunkrc | |
echo version=${{ matrix.splunk }} >> .splunkrc | |
- name: Test using maven | |
working-directory: java | |
run: make test | |
env: | |
SPLUNK_HOME: "/opt/splunk" | |
TEST_TCP_PORT: 10667 | |
TEST_UDP_PORT: 10668 |