Skip to content

Commit

Permalink
CI: fighting with Poetry PATH on Windows
Browse files Browse the repository at this point in the history
Disabling the Windows CI for now because Poetry has issues:

python-poetry/poetry#7158
  • Loading branch information
stanislaw committed Jan 10, 2023
1 parent f8a0ff8 commit f32edb1
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
33 changes: 22 additions & 11 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
name: "FileCheck.py on Windows"

on: [pull_request]
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "**" ]

jobs:
build:
runs-on: windows-latest

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: "Print Debug info"
run: |
python --version
echo $env:USERPROFILE
echo $env:PATH
echo "$PWD"
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
Expand All @@ -28,24 +39,24 @@ jobs:
- name: "Poetry: add to %PATH%"
run: |
echo "%APPDATA%\pypoetry" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: "Print Debug info"
run: |
echo $env:USERPROFILE
echo $env:PATH
echo "$PWD"
# Either of these should work.
echo "$env:APPDATA\pypoetry" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "$env:APPDATA\Python\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: "Poetry: print version"
run: |
poetry --version
- name: "Poetry: configure settings"
run: |
# https://github.com/python-poetry/poetry/issues/6098
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
poetry config virtualenvs.prefer-active-python
- name: "Poetry: Install dependencies"
run: |
poetry run python --version
poetry install
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ black = ">=21.9b0"
bump2version = ">=0.5.11"
coverage = ">=5.4"
flake8 = ">=3.9.2"
invoke = ">=1.3.0"
invoke = ">=1.4.1"
lit = ">=0.9"
pylint = ">=2.12.2"
pytest = ">=6.2.2"
Expand Down
11 changes: 9 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
import re
from typing import Optional

import invoke
from invoke import task
# Ugly but works:
# https://github.com/pyinvoke/invoke/issues/833#issuecomment-1293148106
import inspect

if not hasattr(inspect, "getargspec"):
inspect.getargspec = inspect.getfullargspec

from invoke import task # pylint: disable=wrong-import-position
import invoke # pylint: disable=wrong-import-position

FILECHECK_LLVM_8_EXEC = "FileCheck-8.0.1"
FILECHECK_LLVM_9_EXEC = "FileCheck-9.0.1"
Expand Down

0 comments on commit f32edb1

Please sign in to comment.