Skip to content

Commit ab35aea

Browse files
authored
Merge pull request #251 from LauraMeneghetti/ci_action
CI GitHub action
2 parents 0896488 + 54b49a6 commit ab35aea

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Testing"
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest]
11+
python-version: [3.8]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- name: Install Python dependencies
22+
run: |
23+
python3 -m pip install --upgrade pip
24+
python3 -m pip install numpy scipy matplotlib pytest pytest-cov
25+
26+
- name: Test with pytest
27+
env:
28+
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
29+
run: |
30+
if [ -z "$CODACY_API_TOKEN" ]
31+
then
32+
python3 -m pytest
33+
else
34+
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pygem
35+
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml -t $CODACY_API_TOKEN
36+
fi
37+

0 commit comments

Comments
 (0)