Skip to content

Commit

Permalink
CI: GitHub Actions on Windows setup
Browse files Browse the repository at this point in the history
Closes #112
  • Loading branch information
stanislaw committed Apr 14, 2020
1 parent b690033 commit 3abe087
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
66 changes: 66 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
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 PATH"
run: |
echo $env:USERPROFILE
echo $env:PATH
- name: "Print PWD"
run: |
echo "$PWD"
- name: "WIP: type"
run: |
type "D:/a/FileCheck.py/FileCheck.py/tests/i/filecheck.iii"
type "D:/a/FileCheck.py/FileCheck.py/tests/i/filecheck.iii" | echo
type "D:/a/FileCheck.py/FileCheck.py/tests/i/tests/check_commands/CHECK-EMPTY/01-error_CHECK_EMPTY_without_previous_CHECK/filecheck.input"
type "D:/a/FileCheck.py/FileCheck.py/tests/i/tests/check_commands/CHECK-EMPTY/01-error_CHECK_EMPTY_without_previous_CHECK/filecheck.input" | echo
python --version
$psversiontable
- 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
shell: powershell
3 changes: 2 additions & 1 deletion tests/integration/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 3abe087

Please sign in to comment.