From afa033addbcf64e0466c65f6138aaef3b730cf07 Mon Sep 17 00:00:00 2001 From: travis Date: Mon, 14 Jun 2021 15:11:43 -0700 Subject: [PATCH] only run linux build on push; others on PR --- .github/workflows/build_linux.yml | 11 +++++++++-- .github/workflows/build_osx.yml | 13 +++---------- .github/workflows/build_windows.yml | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index c4cefde..5820793 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -28,7 +28,14 @@ jobs: python -m pip install --upgrade pip pip install . - - name: Test + - name: Test and generate coverage report run: | pip install pytest - pytest + pip install pytest-cov + pytest --cov=./ --cov-report=xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + fail_ci_if_error: true diff --git a/.github/workflows/build_osx.yml b/.github/workflows/build_osx.yml index fcb003f..97f2526 100644 --- a/.github/workflows/build_osx.yml +++ b/.github/workflows/build_osx.yml @@ -1,6 +1,6 @@ name: osx -on: [push] +on: [pull_request] jobs: build: @@ -28,14 +28,7 @@ jobs: python -m pip install --upgrade pip pip install . - - name: Test and generate coverage report + - name: Test run: | pip install pytest - pip install pytest-cov - pytest --cov=./ --cov-report=xml - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml - fail_ci_if_error: true + pytest diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index a1841d7..61e0962 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -1,6 +1,6 @@ name: windows -on: [push] +on: [pull_request] jobs: build: