Skip to content

Commit e2b3c5a

Browse files
committed
fix CI error: Unable to locate executable file: poetry
also adds poetry caching to .github/workflows/release.yml and .github/workflows/pytest-docs.yml which weren't previously using it
1 parent c4122b4 commit e2b3c5a

File tree

3 files changed

+32
-9
lines changed

3 files changed

+32
-9
lines changed

.github/workflows/pull-request.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,27 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v3
14+
15+
- name: Install poetry
16+
# install poetry before setup-python to enable cache retrieval
17+
run: pipx install poetry
18+
1419
- name: Set up Python 3.8
1520
uses: actions/setup-python@v4
1621
with:
1722
python-version: 3.8
1823
cache: poetry
19-
cache-dependency-path: poetry.lock
24+
2025
- name: Install webdriver and poetry
2126
run: |
2227
sudo apt-get update && sudo apt-get install firefox-geckodriver
23-
pip install --upgrade pip && pip install --no-cache-dir poetry
28+
pip install --upgrade pip
2429
poetry config virtualenvs.in-project false
2530
poetry config virtualenvs.path ~/.virtualenvs
31+
2632
- name: Install dependencies
2733
run: poetry install -E server -E fermi
28-
if: steps.cache.outputs.cache-hit != 'true'
34+
2935
- name: Test with pytest
3036
env:
3137
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

.github/workflows/pytest-docs.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,27 @@ jobs:
88

99
steps:
1010
- uses: actions/checkout@v3
11+
12+
- name: Install poetry
13+
# install poetry before setup-python to enable cache retrieval
14+
run: pipx install poetry
15+
1116
- name: Set up Python 3.8
1217
uses: actions/setup-python@v4
1318
with:
1419
python-version: 3.8
20+
cache: poetry
21+
1522
- name: Install webdriver and poetry
1623
run: |
1724
sudo apt-get update && sudo apt-get install firefox-geckodriver
18-
pip install --upgrade pip && pip install --no-cache-dir poetry
25+
pip install --upgrade pip
1926
poetry config virtualenvs.in-project false
2027
poetry config virtualenvs.path ~/.virtualenvs
28+
2129
- name: Install dependencies
2230
run: poetry install -E server -E fermi
23-
if: steps.cache.outputs.cache-hit != 'true'
31+
2432
- name: Build new docs
2533
run: |
2634
git config --global user.name 'Matthew Horton'
@@ -29,12 +37,14 @@ jobs:
2937
git checkout "${GITHUB_REF:11}"
3038
cd docs_rst
3139
poetry run make html
40+
3241
- name: Commit new docs
3342
run: |
3443
git add -A
3544
git diff-index --quiet HEAD || git commit -m "Automated doc build"
3645
git push
3746
continue-on-error: true
47+
3848
- name: Test with pytest
3949
env:
4050
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

.github/workflows/release.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,23 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111
with:
12-
ref: main
1312
fetch-depth: 2
14-
- name: Set up Python 3.7
13+
14+
- name: Install poetry
15+
# install poetry before setup-python to enable cache retrieval
16+
run: pipx install poetry
17+
18+
- name: Set up Python 3.8
1519
uses: actions/setup-python@v4
1620
with:
17-
python-version: 3.7
21+
python-version: 3.8
22+
cache: poetry
23+
1824
- name: Install dependencies
1925
run: |
20-
pip install --upgrade pip && pip install --no-cache-dir poetry
26+
pip install --upgrade pip
2127
poetry install -E server -E fermi
28+
2229
- name: Build and publish
2330
run: |
2431
poetry build

0 commit comments

Comments
 (0)