|
1 | | -name: Python CI |
| 1 | +name: Run test suite |
2 | 2 |
|
3 | 3 | on: [push, workflow_dispatch] |
4 | 4 |
|
5 | 5 | jobs: |
6 | | - build: |
| 6 | + test: |
7 | 7 | runs-on: ${{ matrix.os }} |
8 | 8 | strategy: |
9 | 9 | matrix: |
10 | 10 | os: [ubuntu-latest] |
11 | | - python-version: [3.9, 3.13] |
12 | | - splunk-version: ["8.2", "9.4", "latest"] |
| 11 | + python-version: |
| 12 | + - 3.7 |
| 13 | + # - 3.9 |
| 14 | + # - 3.13 |
| 15 | + splunk-version: |
| 16 | + - "8.2" |
| 17 | + # - "9.3" |
| 18 | + # - "9.4" |
| 19 | + # - "latest" |
13 | 20 | fail-fast: false |
14 | 21 | steps: |
15 | 22 | - name: Checkout repo |
16 | 23 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 |
17 | 24 | - name: Set up environment variables |
18 | | - run: cp ./.env.template ./.env |
| 25 | + run: cp ./.env.test ./.env |
19 | 26 | - name: Launch Splunk ${{ matrix.splunk-version }} |
20 | 27 | run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d |
21 | 28 | - name: Set up Python ${{ matrix.python-version }} |
22 | 29 | uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 |
23 | 30 | with: |
24 | 31 | python-version: ${{ matrix.python-version }} |
25 | 32 | - name: Install dependencies |
26 | | - run: type -a python && python --version && python -m pip install . --group dev |
| 33 | + run: type -a python && python -m pip install tox |
| 34 | + - name: Run Docker health check |
| 35 | + # This probably does nothing |
| 36 | + run: | |
| 37 | + timeout 30s make wait_up |
| 38 | + if [ $? -eq 124 ]; then |
| 39 | + echo "Splunk failed to start within 30 seconds." |
| 40 | + docker compose logs |
| 41 | + exit 1 |
| 42 | + fi |
27 | 43 | - name: Run test suite |
28 | | - run: type -a python && python --version && python -m tox -e py |
| 44 | + run: type -a python && python -m tox -e py |
29 | 45 | # [BJ] I'll uncomment this step after I finish fiddling |
30 | 46 | # fossa-scan: |
31 | 47 | # uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main |
|
0 commit comments