-
Notifications
You must be signed in to change notification settings - Fork 383
51 lines (49 loc) · 1.59 KB
/
test.yml
File metadata and controls
51 lines (49 loc) · 1.59 KB
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
name: Python CI
on: [push, workflow_dispatch]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
# - ubuntu-latest
python-version:
- 3.7
# - 3.9
- 3.13
splunk-version:
- "9.3"
# - "9.4"
- "latest"
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up environment variables
run: cp ./.env.test ./.env
- name: Launch Splunk ${{ matrix.splunk-version }}
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: type -a python && python -m pip install tox
- name: Run Docker health check
# Probably solves nothing, worth trying regardless
run: |
timeout 30s make wait_up
if [ $? -eq 124 ]; then
echo "Splunk failed to start within 30 seconds."
docker compose logs
exit 1
fi
- name: Run test suite
run: type -a python && python -m tox -e py
- name: Print docker logs for optional inspection
run: docker compose logs
# [BJ] I'll uncomment this step after I finish fiddling
# fossa-scan:
# uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
# secrets: inherit