Skip to content

Commit

Permalink
Added file ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura Meneghetti committed Oct 21, 2021
1 parent 3fbd566 commit 4418ff7
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Testing"

on: push

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install numpy scipy matplotlib pytest pytest-cov
- name: Test with pytest
env:
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
run: |
if [ -z "$CODACY_API_TOKEN" ]
then
python3 -m pytest
else
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=smithers
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml -t $CODACY_API_TOKEN
fi

0 comments on commit 4418ff7

Please sign in to comment.