Skip to content

Commit 035e72a

Browse files
committed
CI: First pass at GitHub actions
1 parent 711043b commit 035e72a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/pytest.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Pytest
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
tags: [ '*' ]
7+
pull_request:
8+
branches: [ master, 'maint/*' ]
9+
10+
jobs:
11+
build:
12+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: [3.7, 3.8, 3.9]
17+
18+
steps:
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 0
26+
- name: Install nibabies
27+
run: |
28+
python -m venv /tmp/venv
29+
source /tmp/venv/bin/activate
30+
python -m pip install -U pip
31+
python -m pip install ".[test]"
32+
- name: Run Pytest
33+
run: |
34+
source /tmp/venv/bin/activate
35+
pytest -sv --doctest-modules --cov nibabies --cov-report xml nibabies
36+
- name: Submit coverage
37+
run: |
38+
# Pin codecov version to reduce scope for malicious updates
39+
python -m pip install "codecov==2.1.11"
40+
python -m codecov --file coverage.xml

0 commit comments

Comments
 (0)