Skip to content

Commit

Permalink
start porting test from Travis to Github-Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanssen2 committed May 13, 2024
1 parent c276adf commit 3b57481
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/sepp_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: SEPP_github_tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
python_tests:
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
- name: setup conda
uses: conda-incubator/setup-miniconda@v2
with:
# This uses *miniforge*, rather than *minicond*. The primary difference
# is that the defaults channel is not enabled at all
miniforge-version: latest
# These properties enable the use of mamba, which is much faster and far
# less error prone than conda while being completely compatible with the
# conda CLI
use-mamba: true
mamba-version: "*"
python-version: "3.9"
environment-file: environment.yml
- name: install sepp
run: |
python setup.py config -c
python setup.py install
- name: run python tests
shell: bash -el {0}
run: |
nosetests test/unittest --with-doctest --with-coverage
- name: convert coverage
shell: bash -el {0}
run: |
coverage lcov
- name: send coverage report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "coverage.lcov"
10 changes: 10 additions & 0 deletions sepp/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: sepp
channels:
- conda-forge
- defaults
dependencies:
- flake8
- nose
- coverage >= 6 # to ensure lcov option is available
- java-jdk
- pep8

0 comments on commit 3b57481

Please sign in to comment.