Skip to content

Commit

Permalink
ci: add test guardian
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jul 20, 2023
1 parent 2b47d99 commit a225859
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/ci_test-acts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ name: CI internal

# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the main branch
push: {}
pull_request:
push:
branches: [main]
pull_request: {}

defaults:
run:
shell: bash

jobs:
pytest-internal:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -21,7 +20,6 @@ jobs:
python: ["3.9"]
# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
Expand All @@ -44,14 +42,7 @@ jobs:
run: pip install -q -r requirements.txt

- name: Testing
run: coverage run -m pytest _actions -v --junitxml="junit/test-results-${{ runner.os }}-${{ matrix.python }}.xml"

- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ runner.os }}-${{ matrix.python }}
path: junit/test-results-${{ runner.os }}-${{ matrix.python }}.xml
if: failure()
run: coverage run -m pytest _actions -v

- name: Statistics
run: |
Expand All @@ -68,3 +59,18 @@ jobs:
flags: cpu,pytest,${{ runner.os }}
name: CLI-coverage
fail_ci_if_error: false


testing-guardian:
runs-on: ubuntu-latest
needs: pytest-internal
if: always()
steps:
- run: echo "${{ needs.pytester.result }}"
- name: failing...
if: needs.pytester.result == 'failure'
run: exit 1
- name: cancelled or skipped...
if: contains(fromJSON('["cancelled", "skipped"]'), needs.pytester.result)
timeout-minutes: 1
run: sleep 90

0 comments on commit a225859

Please sign in to comment.