-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.75 KB
/
github_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: integration tests & code style
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-linux:
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: "*"
environment-file: environment.yml
python-version: "3.10"
- name: Lint with flake8
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to
# be explicitely declared as shell: bash -el {0} on steps that need to be
# properly activated (or use a default shell). This is because bash shells
# are executed with bash --noprofile --norc -eo pipefail {0} thus ignoring
# updated on bash profile files made by conda init bash. See Github
# Actions Documentation and thread.
shell: bash -el {0}
run: |
flake8 phylofiller/
- name: run python tests
shell: bash -el {0}
run: |
nosetests phylofiller --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"