Skip to content

Commit

Permalink
Try cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Jul 18, 2023
1 parent 3c6a45f commit 948d6d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
13 changes: 6 additions & 7 deletions .github/actions/env/action.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: exportenv
name: env
description: Construct env for each operating system
runs:
using: 'composite'
steps:
- name: Common envs
shell: bash
- shell: bash
run: |
cat >> $GITHUB_ENV << EOF
XDIST_ARGUMENTS=-n auto
PYTEST_ARGUMENTS=--randomly-seed=1 --disable-warnings --reruns 1 --reruns-delay 1 --verbose --durations=3 --showlocals
EOF
- shell: bash
run: |
cat >> $GITHUB_ENV << EOF
PYTEST_CORE_ARGUMENTS=./src/tribler/core ${PYTEST_ARGUMENTS}
PYTEST_TUNNELS_ARGUMENTS=./src/tribler/core/components/tunnel/tests/test_full_session --tunneltests ${PYTEST_ARGUMENTS}
PYTEST_GUI_ARGUMENTS=./src/tribler/gui --guitests ${PYTEST_ARGUMENTS}
EOF
- name: Linux and macOS
if: runner.os == 'Linux' || runner.os == 'macOS'
- if: runner.os == 'Linux' || runner.os == 'macOS'
shell: bash
run: |
cat >> $GITHUB_ENV << EOF
Expand All @@ -27,8 +27,7 @@ runs:
PYTEST_GUI_ARGUMENTS=${PYTEST_GUI_ARGUMENTS} --looptime
EOF
- name: Linux
if: runner.os == 'Linux'
- if: runner.os == 'Linux'
shell: bash
run: |
cat >> $GITHUB_ENV << EOF
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
env:
PYTEST_SENTRY_DSN: ${{secrets.PYTEST_SENTRY_DSN}}

timeout-minutes: 10
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
Expand All @@ -60,8 +60,15 @@ jobs:
- name: Export env
uses: ./.github/actions/env

- name: Run Pytest with xdist
id: xdist
timeout-minutes: 5
run: |
pytest ${PYTEST_CORE_ARGUMENTS} ${XDIST_ARGUMENTS}
pytest ${PYTEST_TUNNELS_ARGUMENTS} ${XDIST_ARGUMENTS}
- name: Run Pytest
if: runner.os == 'macOS'
if: ${{ failure() && steps.xdist.conclusion == 'cancelled' }}
run: |
pytest ${PYTEST_CORE_ARGUMENTS}
pytest ${PYTEST_TUNNELS_ARGUMENTS}
pytest ${PYTEST_CORE_ARGUMENTS}
pytest ${PYTEST_TUNNELS_ARGUMENTS}

0 comments on commit 948d6d0

Please sign in to comment.