From 2a955355e31fe4a124b49ce4723335d308ee09d2 Mon Sep 17 00:00:00 2001 From: Ziqi Li Date: Mon, 7 Mar 2022 09:31:38 +0000 Subject: [PATCH] update unittest.yml (#115) Fix test timeout in Actions. Changed from 30 minutes to 90 minutes. * Update unittest.yml * add timeout to pytests --- .ci/37.yaml | 1 + .ci/38.yaml | 1 + .ci/39-DEV.yaml | 1 + .ci/39.yaml | 1 + .github/workflows/unittest.yml | 6 +++--- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.ci/37.yaml b/.ci/37.yaml index 745eaad..c84966b 100644 --- a/.ci/37.yaml +++ b/.ci/37.yaml @@ -15,3 +15,4 @@ dependencies: - coverage - pytest - pytest-cov + - pytest-timeout diff --git a/.ci/38.yaml b/.ci/38.yaml index ccc0fc7..74c13be 100644 --- a/.ci/38.yaml +++ b/.ci/38.yaml @@ -15,3 +15,4 @@ dependencies: - coverage - pytest - pytest-cov + - pytest-timeout diff --git a/.ci/39-DEV.yaml b/.ci/39-DEV.yaml index cf30639..0cc85ae 100644 --- a/.ci/39-DEV.yaml +++ b/.ci/39-DEV.yaml @@ -16,3 +16,4 @@ dependencies: - coverage - pytest - pytest-cov + - pytest-timeout diff --git a/.ci/39.yaml b/.ci/39.yaml index 7e0967e..5870f73 100644 --- a/.ci/39.yaml +++ b/.ci/39.yaml @@ -15,3 +15,4 @@ dependencies: - coverage - pytest - pytest-cov + - pytest-timeout diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 9d99368..1ddb0c4 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -12,7 +12,7 @@ unittests: name: ${{ matrix.os }}, ${{ matrix.environment-file }} runs-on: ${{ matrix.os }} - timeout-minutes: 30 + timeout-minutes: 90 strategy: matrix: os: ['macos-latest', 'ubuntu-latest', 'windows-latest'] @@ -45,12 +45,12 @@ - name: run tests - bash shell: bash -l {0} - run: pytest -v mgwr --cov=mgwr --cov-report=xml + run: pytest -v mgwr --cov=mgwr --cov-report=xml --timeout=300 if: matrix.os != 'windows-latest' - name: run tests - powershell shell: powershell - run: pytest -v mgwr --cov=mgwr --cov-report=xml + run: pytest -v mgwr --cov=mgwr --cov-report=xml --timeout=300 if: matrix.os == 'windows-latest' - name: codecov