Skip to content

Commit e1f7e3b

Browse files
alternative approach to attempt to force tox to use correct python version for architecture
1 parent 64919f3 commit e1f7e3b

File tree

1 file changed

+20
-42
lines changed

1 file changed

+20
-42
lines changed

.github/workflows/github-actions.yml

Lines changed: 20 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
os: 'ubuntu-latest'
5959
- name: 'py311 (macos)'
6060
python: '3.11'
61-
python_arch: 'arm64' # Correct architecture for macos-latest
61+
python_arch: 'arm64'
6262
tox_env: 'py311'
6363
os: 'macos-latest'
6464
- name: 'py311 (windows)'
@@ -95,32 +95,24 @@ jobs:
9595
- uses: actions/checkout@v4
9696
with:
9797
fetch-depth: 0
98-
99-
- name: Set up Python
100-
uses: actions/setup-python@v5
98+
- uses: actions/setup-python@v5
10199
id: setup
102100
with:
103101
python-version: ${{ matrix.python }}
104102
architecture: ${{ matrix.python_arch }}
105103

106-
- name: install dependencies
107-
run: |
108-
${{ steps.setup.outputs.python-path }} -mpip install --upgrade pip
109-
${{ steps.setup.outputs.python-path }} -mpip install --progress-bar=off -r ci/requirements.txt
110-
virtualenv --version
111-
pip --version
112-
tox --version
113-
pip list --format=freeze
114-
115104
- name: test
116-
env:
117-
TOXPYTHON: ${{ steps.setup.outputs.python-path }}
118-
run: >
105+
shell: zsh {0}
106+
run: |
107+
${{ steps.setup.outputs.python-path }} -m venv .venv
108+
source .venv/bin/activate
109+
python -m pip install --upgrade pip
110+
pip install -r ci/requirements.txt
119111
tox -e ${{ matrix.tox_env }} -v
120112
121113
coveralls:
122114
name: Upload coverage to Coveralls
123-
if: github.ref == 'refs/heads/main' # Prevent from running on PRs, tags
115+
if: github.ref == 'refs/heads/main'
124116
needs: test
125117
runs-on: ubuntu-latest
126118
steps:
@@ -132,25 +124,18 @@ jobs:
132124
with:
133125
python-version: '3.11'
134126
architecture: 'x64'
135-
- name: install dependencies
136-
run: |
137-
${{ steps.setup.outputs.python-path }} -mpip install --upgrade pip
138-
${{ steps.setup.outputs.python-path }} -mpip install --progress-bar=off -r ci/requirements.txt
139-
virtualenv --version
140-
pip --version
141-
tox --version
142-
pip list --format=freeze
143127
- name: generate coverage report
144-
env:
145-
TOXPYTHON: '3.11'
146-
# TOXPYTHON: ${{ steps.setup.outputs.python-path }}
128+
shell: zsh {0}
147129
run: |
130+
${{ steps.setup.outputs.python-path }} -m venv .venv
131+
source .venv/bin/activate
132+
python -m pip install --upgrade pip
133+
pip install -r ci/requirements.txt
148134
tox -e py311
149135
150136
- name: Coveralls GitHub Action
151137
uses: coverallsapp/[email protected]
152138

153-
154139
deploy_docs:
155140
name: Deploy docs to GitHub Pages
156141
if: github.ref == 'refs/heads/main' # Prevent from running on PRs, tags
@@ -168,25 +153,18 @@ jobs:
168153
with:
169154
python-version: '3.11'
170155
architecture: 'x64'
171-
- name: install dependencies
172-
run: |
173-
${{ steps.setup.outputs.python-path }} -mpip install --upgrade pip
174-
${{ steps.setup.outputs.python-path }} -mpip install --progress-bar=off -r ci/requirements.txt
175-
virtualenv --version
176-
pip --version
177-
tox --version
178-
pip list --format=freeze
179156

180157
- name: generate docs
181-
env:
182-
TOXPYTHON: '3.11'
183-
# TOXPYTHON: ${{ steps.setup.outputs.python-path }}
158+
shell: zsh {0}
184159
run: |
160+
${{ steps.setup.outputs.python-path }} -m venv .venv
161+
source .venv/bin/activate
162+
python -m pip install --upgrade pip
163+
pip install -r ci/requirements.txt
185164
tox -e docs -v
186-
ls -l dist/docs
187165
cp -r dist/docs _site/
188166
189-
- name: fix permissions # https://github.com/actions/upload-pages-artifact#file-permissions
167+
- name: Fix permissions # https://github.com/actions/upload-pages-artifact#file-permissions
190168
run: |
191169
chmod -c -R +rX "_site/" | while read line; do
192170
echo "::warning title=Invalid file permissions automatically fixed::$line"

0 commit comments

Comments
 (0)