-
Notifications
You must be signed in to change notification settings - Fork 383
49 lines (48 loc) · 1.75 KB
/
test.yml
File metadata and controls
49 lines (48 loc) · 1.75 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
name: Python SDK CI
on:
push:
branches: [master, develop]
jobs:
test-stage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
splunk-version: [9.4, latest]
include:
- os: ubuntu-latest
python-version: 3.13
splunk-version: latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Set up latest uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
with:
version: 0.11.6
activate-environment: true
enable-cache: true
- name: Install Python dependencies
run: SDK_DEPS_GROUP="test" make uv-sync-ci
- name: Launch Splunk Docker instance
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
- name: Set up `.env`
run: cp .env.template .env
- name: Restore `pytest` cache
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop' }}
uses: actions/cache@565629816435f6c0b50676926c9b05c254113c0c
with:
path: .pytest_cache
key: pytest-cache-${{ runner.os }}-py${{ matrix.python-version }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
pytest-cache-${{ runner.os }}-py${{ matrix.python-version }}-${{ github.ref_name }}-
- name: Run unit tests
run: make test-unit
- name: Run integration/system tests
run: make test-integration