Skip to content

Commit

Permalink
Add windows and mac builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcth committed Nov 26, 2023
1 parent f988757 commit b92a7b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/github-action-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11"]

steps:
Expand All @@ -22,10 +23,12 @@ jobs:
pytest --cov-report term-missing --cov=src/smhi tests
coverage json
- name: Export summary stats
if: runner.os != 'Windows' && matrix.python-version == '3.11'
run: |
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
echo "total=$TOTAL" >> $GITHUB_ENV
- name: Coverage badge
if: runner.os != 'Windows' && matrix.python-version == '3.11'
uses: schneegans/[email protected]
with:
auth: ${{ secrets.BADGE_SECRET }}
Expand Down

0 comments on commit b92a7b8

Please sign in to comment.