Skip to content

Commit

Permalink
Remove macos-13 CI target because it does not work and enhance the sc…
Browse files Browse the repository at this point in the history
…ripts auto formatting in CI runners.
  • Loading branch information
AlexeyPechnikov committed Jan 21, 2024
1 parent ba5e265 commit 37b77a2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-12]
os: [macos-12]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -54,11 +54,14 @@ jobs:
working-directory: tests
run: |
export PATH=$PATH:/Users/runner/work/gmtsar/gmtsar/GMTSAR/bin
# remove Google Colab specific commands
sed -i '' '/if \x27google\.colab\x27 in sys\.modules:/,/^$/d' imperial_valley_2015.py
sed -i '' 's/^[[:blank:]]*!.*$//' imperial_valley_2015.py
ulimit -n 10000
python3 imperial_valley_2015.py
# remove Google Colab specific commands and add __main__ section
cat imperial_valley_2015.py \
| sed '/if \x27google\.colab\x27 in sys\.modules:/,/^$/d' \
| sed 's/^[[:blank:]]*!.*$//' \
| awk '/username = \x27GoogleColab2023\x27/ {print "if __name__ == \x27__main__\x27:"; indent=1} {if(indent) sub(/^/, " "); print}' \
> imperial_valley_2015.fixed.py
python3 imperial_valley_2015.fixed.py
- name: Archive test results
uses: actions/upload-artifact@v3
with:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,13 @@ jobs:
Xvfb :99 -screen 0 800x600x24 > /dev/null 2>&1 &
export DISPLAY=:99
export XVFB_PID=$!
# remove Google Colab specific commands
sed -i '/if \x27google\.colab\x27 in sys\.modules:/,/^$/d' imperial_valley_2015.py
sed -i 's/^[[:blank:]]*!.*$//' imperial_valley_2015.py
python3 imperial_valley_2015.py
# remove Google Colab specific commands and add __main__ section
cat imperial_valley_2015.py \
| sed '/if \x27google\.colab\x27 in sys\.modules:/,/^$/d' \
| sed 's/^[[:blank:]]*!.*$//' \
| awk '/username = \x27GoogleColab2023\x27/ {print "if __name__ == \x27__main__\x27:"; indent=1} {if(indent) sub(/^/, " "); print}' \
> imperial_valley_2015.fixed.py
python3 imperial_valley_2015.fixed.py
- name: Archive test results
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 37b77a2

Please sign in to comment.