From b92a7b8794f541f16a7fcd23d6ea5ddfa9d98d9d Mon Sep 17 00:00:00 2001 From: Mladen Gibanica <11275336+mgcth@users.noreply.github.com> Date: Sun, 26 Nov 2023 14:42:55 +0100 Subject: [PATCH] Add windows and mac builds --- .github/workflows/github-action-build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-action-build.yaml b/.github/workflows/github-action-build.yaml index 6b41589e..00c11181 100644 --- a/.github/workflows/github-action-build.yaml +++ b/.github/workflows/github-action-build.yaml @@ -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: @@ -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/dynamic-badges-action@v1.6.0 with: auth: ${{ secrets.BADGE_SECRET }}