Skip to content

Commit 5770ac3

Browse files
committed
Back out of caching for now
1 parent c114d78 commit 5770ac3

File tree

2 files changed

+17
-64
lines changed

2 files changed

+17
-64
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,12 @@ jobs:
1010
steps:
1111
- name: Checkout repo
1212
uses: actions/checkout@v4
13-
- name: Restore cached `venv` and `.tox`
14-
id: restore-venv-cache
15-
uses: actions/cache/restore@v4
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
1615
with:
17-
path: |
18-
./venv
19-
./.tox
20-
key: ${{ runner.os }}-3.9-venv-${{ hashFiles('**/pyproject.toml') }}
21-
- name: Build venv if there's no cache
22-
if: steps.restore-venv-cache.outputs.cache-hit != 'true'
23-
run: |
24-
python -m venv ./venv
25-
- name: Install package
26-
run: ./venv/bin/python -m pip install .
27-
# [BJ] Shouldn't we run tests here to prevent an easily preventable catastrophe?
28-
# Or is test.yml being ran when we publish a package?
16+
python-version: 3.9
17+
- name: Install dependencies
18+
run: pip install .
2919
- name: Build package
3020
# [TODO] We need to confirm this produces the same exact result as `python setup.py sdist`
3121
run: python -m build
@@ -43,11 +33,3 @@ jobs:
4333
with:
4434
name: python_sdk_docs
4535
path: docs/_build/html
46-
- name: Cache venv and .tox
47-
uses: actions/cache/save@v4
48-
if: steps.restore-venv-cache.outputs.cache-hit != 'true'
49-
with:
50-
path: |
51-
./venv
52-
./.tox
53-
key: ${{ steps.restore-venv-cache.outputs.cache-primary-key }}

.github/workflows/test.yml

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,27 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
os:
11-
- ubuntu-latest
12-
python: [3.9, 3.13]
13-
splunk-version:
14-
- "9.3"
15-
- "9.4"
16-
- "latest"
17-
include:
18-
- os: ubuntu-22.04
19-
python: 3.9
20-
splunk-version: "9.3"
21-
- os: ubuntu-22.04
22-
python: 3.9
23-
splunk-version: "9.4"
24-
- os: ubuntu-22.04
25-
python: 3.9
26-
splunk-version: "latest"
10+
os: [ubuntu-latest]
11+
python-version: [3.9, 3.13]
12+
splunk-version: ["9.3", "9.4", "latest"]
13+
2714
fail-fast: false
2815

2916
steps:
3017
- name: Checkout repo
3118
uses: actions/checkout@v4
32-
- name: Set up .env
19+
- name: Set up environment variables
3320
run: cp ./.env.template ./.env
34-
- name: Run docker-compose with Splunk v${{ matrix.splunk-version }}
21+
- name: Run docker-compose with Splunk ${{ matrix.splunk-version }}
3522
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
36-
- name: Restore cached `venv` and `.tox`
37-
id: restore-venv-cache
38-
uses: actions/cache/restore@v4
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
3925
with:
40-
path: |
41-
./venv
42-
./.tox
43-
key: ${{ runner.os }}-3.9-venv-${{ hashFiles('**/pyproject.toml') }}
44-
- name: Build venv if there's no cache
45-
if: steps.restore-venv-cache.outputs.cache-hit != 'true'
46-
run: |
47-
python -m venv ./venv
48-
- name: Install package
49-
run: ./venv/bin/python -m pip install .
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install Python dependencies to venv
28+
run: pip install .
5029
- name: Run test suite
51-
run: ./venv/bin/python -m tox -e py
52-
- name: Cache venv and .tox
53-
uses: actions/cache/save@v4
54-
if: steps.restore-venv-cache.outputs.cache-hit != 'true'
55-
with:
56-
path: |
57-
./venv
58-
./.tox
59-
key: ${{ steps.restore-venv-cache.outputs.cache-primary-key }}
30+
run: python -m tox -e py
6031
# [BJ] I'll obviously uncomment this step after I finish fiddling
6132
# fossa-scan:
6233
# uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main

0 commit comments

Comments
 (0)