diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml new file mode 100644 index 0000000..5aa1acd --- /dev/null +++ b/.github/workflows/ci-windows.yml @@ -0,0 +1,53 @@ +name: "FileCheck.py on Windows" + +on: [pull_request] + +jobs: + build: + runs-on: windows-latest + + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + + - name: Upgrade pip + run: | + python -m pip install --upgrade pip + + - name: Install Poetry + run: | + (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python + + - name: "Poetry: add to %PATH%" + run: | + echo "::add-path::$env:USERPROFILE\.poetry\bin" + + - name: "Print Debug info" + run: | + echo $env:USERPROFILE + echo $env:PATH + echo "$PWD" + + - name: "Poetry: print version" + run: | + poetry --version + + - name: "Poetry: configure settings" + run: | + poetry config virtualenvs.in-project true + + - name: "Poetry: Install dependencies" + run: | + poetry install + + - name: Run tests + run: | + poetry run invoke test diff --git a/tests/integration/lit.cfg b/tests/integration/lit.cfg index 32ddfe4..2e77468 100644 --- a/tests/integration/lit.cfg +++ b/tests/integration/lit.cfg @@ -25,7 +25,8 @@ real_only = lit_config.params['REAL_ONLY'] config.substitutions.append(('%FILECHECK_EXEC', filecheck_exec)) config.substitutions.append(('%FILECHECK_TESTER_EXEC', filecheck_tester_exec)) -cat_exec = "cat" if not is_windows() else "type" +shell = os.environ.get('SHELL', '') +cat_exec = "cat" if (not is_windows() or shell == "/bin/bash") else "type" config.substitutions.append(('%cat', cat_exec)) config.substitutions.append(('%expect_exit', 'python \"{}/tests/integration/tools/expect_exit.py\"'.format(current_dir)))