Publish unit tests results and variations on each PR (#73)

So it's easier to detect that we accidentally marked a lot of tests
as skipped.

* Try EnricoMi/publish-unit-test-result-action@v1

* Make build job generation more modular

* Unify workflows, so their results can be added together in the report (instead of overwriting each other)
This commit is contained in:
2021-07-04 23:12:26 +02:00
committed by Valentin Lorentz
parent 91efa8b001
commit d17cae6a8a
17 changed files with 683 additions and 602 deletions

View File

@ -0,0 +1,68 @@
# This file was auto-generated by make_workflows.py.
# Do not edit it manually, modifications will be lost.
jobs:
publish-test-results:
if: success() || failure()
name: Publish Unit Tests Results
needs:
- test-inspircd
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: artifacts/**/*.xml
test-inspircd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Cache dependencies
uses: actions/cache@v2
with:
key: ${{ runner.os }}-inspircd
path: |-
~/.cache
$GITHUB_WORKSPACE/inspircd
- name: Install dependencies
run: |-
sudo apt-get install atheme-services
python -m pip install --upgrade pip
pip install pytest -r requirements.txt
- name: Checkout InspIRCd
uses: actions/checkout@v2
with:
path: inspircd
ref: insp3
repository: inspircd/inspircd
- name: Build InspIRCd
run: |
cd $GITHUB_WORKSPACE/inspircd/
patch src/inspircd.cpp < $GITHUB_WORKSPACE/inspircd_mainloop.patch
./configure --prefix=$HOME/.local/inspircd --development
make -j 4
make install
- name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml' PATH=~/.local/inspircd/bin:$PATH make
inspircd
- if: always()
name: Publish results
uses: actions/upload-artifact@v2
with:
name: pytest results InspIRCd (devel_release)
path: pytest.xml
name: irctest with devel_release versions
'on':
schedule:
- cron: 51 8 * * 6
- cron: 51 8 * * 0
- cron: 51 17 * * *
workflow_dispatch: null