generated from carpentries-incubator/python-intermediate-inflammation
-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (36 loc) · 1.17 KB
/
main.yml
File metadata and controls
47 lines (36 loc) · 1.17 KB
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
name: CI
# Specify which GitHub events will trigger a CI build
on: push
# Define a single job, build
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9]
# specify the OS of the runner
runs-on: ${{ matrix.os }}
# Define our steps
steps:
# Firstly, check out the repo
- name: Checkout repository
uses: actions/checkout@v2 # A built in action that can be done by github - it simply checks out the repo so we don't have to
# Set up Python env
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install dependencies
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
pip3 install -e .
# Run our tests
- name: Test with PyTest
run: |
pytest tests/test_models.py
# Run the Linter
- name: Check style with Pylint
run: |
python3 -m pylint --fail-under=0 --reports=y inflammation