Skip to content

Commit 16b97e6

Browse files
committed
CI: fighting with Poetry PATH on Windows
Disabling the Windows CI for now because Poetry has issues: python-poetry/poetry#7158
1 parent f8a0ff8 commit 16b97e6

File tree

6 files changed

+38
-19
lines changed

6 files changed

+38
-19
lines changed

.github/workflows/ci-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
python-version: ["3.7", "3.8", "3.9", "3.10"]
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v4
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

.github/workflows/ci-mac.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
python-version: ["3.7", "3.8", "3.9", "3.10"]
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v4
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

.github/workflows/ci-windows.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
name: "FileCheck.py on Windows"
22

3-
on: [pull_request]
3+
# Disabling building on Windows for now.
4+
on:
5+
push:
6+
branches: [ "nonsense-branch" ]
7+
# pull_request:
8+
# branches: [ "**" ]
49

510
jobs:
611
build:
712
runs-on: windows-latest
813

914
strategy:
1015
matrix:
11-
python-version: ["3.7", "3.8", "3.9", "3.10"]
16+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1217

1318
steps:
14-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
1520

1621
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
22+
uses: actions/setup-python@v4
1823
with:
1924
python-version: ${{ matrix.python-version }}
2025

26+
- name: "Print Debug info"
27+
run: |
28+
python --version
29+
echo $env:USERPROFILE
30+
echo $env:PATH
31+
echo "$PWD"
32+
2133
- name: Upgrade pip
2234
run: |
2335
python -m pip install --upgrade pip
@@ -28,24 +40,24 @@ jobs:
2840
2941
- name: "Poetry: add to %PATH%"
3042
run: |
31-
echo "%APPDATA%\pypoetry" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
32-
33-
- name: "Print Debug info"
34-
run: |
35-
echo $env:USERPROFILE
36-
echo $env:PATH
37-
echo "$PWD"
43+
# Either of these should work.
44+
echo "$env:APPDATA\pypoetry" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
45+
echo "$env:APPDATA\Python\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
3846
3947
- name: "Poetry: print version"
4048
run: |
4149
poetry --version
4250
4351
- name: "Poetry: configure settings"
4452
run: |
53+
# https://github.com/python-poetry/poetry/issues/6098
54+
poetry config virtualenvs.create true
4555
poetry config virtualenvs.in-project true
56+
poetry config virtualenvs.prefer-active-python
4657
4758
- name: "Poetry: Install dependencies"
4859
run: |
60+
poetry run python --version
4961
poetry install
5062
5163
- name: Run tests

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ black = ">=21.9b0"
1212
bump2version = ">=0.5.11"
1313
coverage = ">=5.4"
1414
flake8 = ">=3.9.2"
15-
invoke = ">=1.3.0"
15+
invoke = ">=1.4.1"
1616
lit = ">=0.9"
1717
pylint = ">=2.12.2"
1818
pytest = ">=6.2.2"

tasks.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@
33
import re
44
from typing import Optional
55

6-
import invoke
7-
from invoke import task
6+
# Ugly but works:
7+
# https://github.com/pyinvoke/invoke/issues/833#issuecomment-1293148106
8+
import inspect
9+
10+
if not hasattr(inspect, "getargspec"):
11+
inspect.getargspec = inspect.getfullargspec
12+
13+
from invoke import task # pylint: disable=wrong-import-position
14+
import invoke # pylint: disable=wrong-import-position
815

916
FILECHECK_LLVM_8_EXEC = "FileCheck-8.0.1"
1017
FILECHECK_LLVM_9_EXEC = "FileCheck-9.0.1"

0 commit comments

Comments
 (0)