1+ name : " Testing Pull Request"
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - " master"
7+
8+ jobs :
9+ build :
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ os : [windows-latest, macos-latest, ubuntu-latest]
15+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
16+
17+ env :
18+ CFLAGS : " -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"
19+ CXXFLAGS : " -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"
20+
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - name : Set up Python
25+ uses : actions/setup-python@v4
26+ with :
27+ python-version : ${{ matrix.python-version }}
28+
29+ - name : Install system dependencies (Linux)
30+ if : runner.os == 'Linux'
31+ run : |
32+ sudo apt-get update
33+ sudo apt-get install -y libboost-serialization-dev libprotobuf-dev protobuf-compiler libopenblas-dev liblapack-dev
34+
35+ - name : Set up Java for PyCOMPSs
36+ if : runner.os == 'Linux'
37+ uses : actions/setup-java@v3
38+ with :
39+ distribution : ' temurin'
40+ java-version : ' 11'
41+
42+ - name : Install Python dependencies
43+ shell : bash
44+ run : |
45+ python3 -m pip install --upgrade pip
46+ python3 -m pip install setuptools wheel
47+ if [ "$RUNNER_OS" == "Linux" ]; then
48+ python3 -m pip install pycompss --no-build-isolation
49+ fi
50+ python3 -m pip install .[test]
51+
52+ - name : Test with pytest
53+ shell : bash
54+ run : |
55+ if [ "$RUNNER_OS" == "Linux" ]; then
56+ python3 -m pytest
57+ else
58+ python3 -m pytest --ignore=tests/test_parallel/
59+ fi
60+
61+ linter : # ###################################################################
62+ runs-on : ubuntu-latest
63+ steps :
64+ - uses : actions/checkout@v4
65+
66+ - name : Run Black formatter (check mode)
67+ uses : psf/black@stable
68+ with :
69+ src : " ./ezyrb"
70+
71+ testdocs : # #################################################################
72+ runs-on : ubuntu-latest
73+ steps :
74+ - uses : actions/checkout@v4
75+
76+ - name : Install system dependencies
77+ run : sudo apt-get update && sudo apt-get install -y pandoc
78+
79+ - name : Install Python dependencies
80+ run : python3 -m pip install .[docs]
81+
82+ - name : Build Documentation
83+ run : |
84+ make html
85+ working-directory : docs/
86+
87+ coverage : # #################################################################
88+ runs-on : ubuntu-latest
89+ permissions :
90+ contents : write
91+ pull-requests : write
92+
93+ steps :
94+ - uses : actions/checkout@v4
95+
96+ - name : Install system dependencies (Linux)
97+ run : |
98+ sudo apt-get update
99+ sudo apt-get install -y libboost-serialization-dev libprotobuf-dev protobuf-compiler libopenblas-dev liblapack-dev
100+
101+ - name : Install Python dependencies
102+ run : |
103+ python3 -m pip install --upgrade pip
104+ python3 -m pip install setuptools wheel
105+ python3 -m pip install pycompss --no-build-isolation
106+ python3 -m pip install .[test]
107+
108+ - name : Generate coverage report
109+ run : |
110+ python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=ezyrb
111+
112+ - name : Produce the coverage report
113+ if : github.event.pull_request.head.repo.full_name == github.repository
114+ uses : insightsengineering/coverage-action@v2
115+ with :
116+ path : ./cobertura.xml
117+ threshold : 80.00
118+ fail : true
119+ publish : ${{ github.event.pull_request.head.repo.full_name == github.repository }}
120+ coverage-summary-title : " Code Coverage Summary"
0 commit comments