Skip to content

Commit

Permalink
Working on fixing CI for windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
eriq-augustine committed Sep 26, 2023
1 parent 05c242c commit fd96035
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
32 changes: 20 additions & 12 deletions .ci/run.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
#!/bin/bash

readonly THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
readonly BASE_DIR="${THIS_DIR}/.."

trap exit SIGINT
function main() {
if [[ $# -ne 0 ]]; then
echo "USAGE: $0"
exit 1
fi

exitStatus=0
trap exit SIGINT

# Run tests.
echo "Running tests ..."
local error_count=0

"${THIS_DIR}/../run_tests.py"
if [[ $? -eq 0 ]]; then
echo "Tests passed!"
else
echo "Tests failed. :("
exitStatus=1
fi
python "${BASE_DIR}/run_tests.py"
((error_count += $?))

exit ${exitStatus}
if [[ ${error_count} -gt 0 ]] ; then
echo "Found ${error_count} issues."
else
echo "No issues found."
fi

return ${error_count}
}

[[ "${BASH_SOURCE[0]}" == "${0}" ]] && main "$@"
15 changes: 8 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ jobs:

strategy:
matrix:
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macos-11', 'macos-12', 'windows-2022']
python-version: ['3.7', '3.8', '3.9', '3.10', 3.11]
# os: ['ubuntu-20.04', 'ubuntu-22.04', 'macos-11', 'macos-12', 'windows-2022']
# python-version: ['3.7', '3.8', '3.9', '3.10', 3.11]
os: ['windows-2022']
python-version: ['3.10']

runs-on: ${{ matrix.os }}

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

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

Expand All @@ -40,6 +42,5 @@ jobs:
pip3 install -r requirements.txt
- name: Run Tests
run: |
python3 --version
python3 run_tests.py
shell: bash
run: ./.ci/run.sh

0 comments on commit fd96035

Please sign in to comment.