Skip to content

Commit

Permalink
Merge pull request #22 from LauraMeneghetti/ci-action
Browse files Browse the repository at this point in the history
Continuous integration Github action: issue #17
  • Loading branch information
ndem0 authored Oct 21, 2021
2 parents 3fbd566 + 4418ff7 commit c6cf35e
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 c6cf35e

Please sign in to comment.