Skip to content

Commit c114d78

Browse files
committed
Fix build breaking if the cache is invalid
1 parent 18b97df commit c114d78

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
steps:
1111
- name: Checkout repo
1212
uses: actions/checkout@v4
13-
- name: Restore cached venv and .tox
13+
- name: Restore cached `venv` and `.tox`
1414
id: restore-venv-cache
1515
uses: actions/cache/restore@v4
1616
with:
1717
path: |
1818
./venv
1919
./.tox
2020
key: ${{ runner.os }}-3.9-venv-${{ hashFiles('**/pyproject.toml') }}
21-
- name: Build venv
21+
- name: Build venv if there's no cache
2222
if: steps.restore-venv-cache.outputs.cache-hit != 'true'
2323
run: |
2424
python -m venv ./venv
25-
./venv/bin/python -m pip install .
26-
25+
- name: Install package
26+
run: ./venv/bin/python -m pip install .
2727
# [BJ] Shouldn't we run tests here to prevent an easily preventable catastrophe?
2828
# Or is test.yml being ran when we publish a package?
2929
- name: Build package

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,20 @@ jobs:
3333
run: cp ./.env.template ./.env
3434
- name: Run docker-compose with Splunk v${{ matrix.splunk-version }}
3535
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
36-
- name: Restore cached venv and .tox
36+
- name: Restore cached `venv` and `.tox`
3737
id: restore-venv-cache
3838
uses: actions/cache/restore@v4
3939
with:
4040
path: |
4141
./venv
4242
./.tox
4343
key: ${{ runner.os }}-3.9-venv-${{ hashFiles('**/pyproject.toml') }}
44-
- name: Build venv
44+
- name: Build venv if there's no cache
4545
if: steps.restore-venv-cache.outputs.cache-hit != 'true'
4646
run: |
4747
python -m venv ./venv
48-
./venv/bin/python -m pip install .
48+
- name: Install package
49+
run: ./venv/bin/python -m pip install .
4950
- name: Run test suite
5051
run: ./venv/bin/python -m tox -e py
5152
- name: Cache venv and .tox

0 commit comments

Comments
 (0)