From 0d8f5216a2fd74f24b55d5b22bf10c188336f1a3 Mon Sep 17 00:00:00 2001 From: Silvio Tomatis Date: Thu, 20 Jul 2023 15:54:10 +0200 Subject: [PATCH] Add cache and test reporting --- .github/workflows/test.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 45861561..a0bbf7ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,10 +12,25 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.10' + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }} - name: Install dependencies run: | python -m pip install --upgrade pip - pip install git+https://github.com/Dallinger/Dallinger.git@issues/5330-websocket-updates#egg=dallinger pip install -r dev-requirements.txt + - name: Install dallinger + run: | + pip install git+https://github.com/Dallinger/Dallinger.git@issues/5330-websocket-updates#egg=dallinger - name: Run pytest - run: pytest + run: pytest --junit-xml=test-results.xml + - name: Surface failing tests + if: always() + uses: pmeier/pytest-results-action@main + with: + path: test-results.xml + summary: true + display-options: fEX + fail-on-empty: true