-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add uploading of coverage to codecov
- Loading branch information
1 parent
92bb467
commit bd45dc6
Showing
8 changed files
with
134 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: install_dependencies | ||
description: Installs dependencies for the pip build | ||
|
||
inputs: | ||
os: | ||
required: true | ||
|
||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Ubuntu dependencies | ||
if: inputs.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libxcb-image0 libxcb-icccm4 libxcb-keysyms1 libxcb-randr0 libxcb-render0 libxcb-render-util0 libxcb-shape0 libxcb-shm0 libxcb-xfixes0 libxcb-xinerama0 libfontconfig1 libxcb-xkb1 libxkbcommon-x11-0 libdbus-1-3 x11-xserver-utils herbstluftwm | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Python coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'version-**' | ||
tags: "*" | ||
pull_request: | ||
|
||
jobs: | ||
python-test-coverage: | ||
name: Python Coverage | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
system-under-test: ['res', 'ert'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: './.github/actions/install_dependencies' | ||
with: | ||
os: ubuntu-latest | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install with dependencies | ||
run: | | ||
pip install -r dev-requirements.txt | ||
pip install . | ||
- name: Run ert tests | ||
if: matrix.system-under-test == 'ert' | ||
env: | ||
DISPLAY: ':99.0' | ||
run: | | ||
ci/github/start_herbstluftwm.sh & | ||
sleep 5 | ||
# We run the tests from the test directory as pytest-cov (at least as | ||
# of 3.0.0) will create an incorrect report when a directory matches | ||
# the package name | ||
cd tests | ||
pytest ert_tests --cov=ert --cov=ert3 --cov=ert_data --cov=ert_gui --cov=ert_shared --cov=ert_logging --cov=res --cov-report=xml:cov.xml | ||
- name: Run res tests | ||
if: matrix.system-under-test == 'res' | ||
run: | | ||
cd tests | ||
pytest libres_tests --cov=res --cov-report=xml:cov.xml | ||
- name: Upload python coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: tests/cov.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 640x480x24 -ac +extension GLX | ||
sleep 3 | ||
herbstluftwm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fixes: | ||
- "*/site-packages/::" | ||
- "/home/runner/work/ert/ert/::" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ setuptools_scm | |
pytest-snapshot | ||
flake8>=4.0.0 | ||
cmake-format | ||
|
||
pytest-cov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters