From ff6c17f5880428fe176c871c255222c7b7ae9879 Mon Sep 17 00:00:00 2001 From: umarcor Date: Fri, 1 Jan 2021 02:24:55 +0100 Subject: ci: add job 'Coverage' --- .github/workflows/push.yml | 44 ++++++++++++++++++++++++++++++++++++++++++-- testsuite/testsuite.sh | 2 +- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 50cd3cbd0..db1ca813b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -120,7 +120,7 @@ jobs: # Windows Build # - win: + win-build: runs-on: windows-latest strategy: fail-fast: false @@ -182,7 +182,7 @@ jobs: # win-test: - needs: win + needs: win-build runs-on: windows-latest strategy: fail-fast: false @@ -260,6 +260,46 @@ jobs: -H "Authorization: token ${{ secrets.GHDL_BOT }}" \ --data '{"event_type": "ghdl"}' +# +# Coverage (MINGW64) +# + + coverage: + needs: win-build + runs-on: windows-latest + name: '🟪 Coverage' + defaults: + run: + shell: msys2 {0} + steps: + + - name: '🟪 Setup MSYS2' + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: mingw-w64-x86_64-python-pip + + - run: git config --global core.autocrlf input + shell: bash + + - name: '🧰 Checkout' + uses: actions/checkout@v2 + + - name: '📥 Download artifact: package' + uses: actions/download-artifact@v2 + + - name: Install package and Python dependencies + run: | + pacman --noconfirm -U artifact/mingw-w64-x86_64-ghdl-llvm-*.zst + pip3 install -r testsuite/requirements.txt + + - name: Test package + run: | + GHDL=ghdl \ + PYTEST_ARGS='--cov=.. --cov-config=.coveragerc' \ + ./testsuite/testsuite.sh pyunit + #--- # TODO: diff --git a/testsuite/testsuite.sh b/testsuite/testsuite.sh index 9e4321034..d56d78ffe 100755 --- a/testsuite/testsuite.sh +++ b/testsuite/testsuite.sh @@ -141,7 +141,7 @@ do_gna () { # The Python Unit testsuite: regression testsuite for Python bindings to libghdl do_pyunit () { gstart "[GHDL - test] pyunit" - PYTHONPATH=$(pwd)/.. python3 -m pytest -rA --cov=.. --cov-config=.coveragerc pyunit + PYTHONPATH=$(pwd)/.. python3 -m pytest -rA $PYTEST_ARGS pyunit gend } -- cgit v1.2.3