-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (39 loc) · 1.19 KB
/
lint_and_test.yaml
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
# GitHub Action for mffpy to run linting and tests
---
name: lint-and-test
on:
push: # This will make the workflow run again after a successful PR.
branches:
- master
- develop
pull_request: # This will trigger on all pull requests.
jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided.
test_mffpy:
# Name the job
name: Lint and Test
# Set the type of machine to run on
runs-on: ubuntu-20.04
steps:
# Check out the latest commit from the current branch
- name: Checkout Current Branch
uses: actions/checkout@v2
- name: Setup Python 3.6.7
uses: actions/setup-python@v2
with:
python-version: '3.6.7'
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ./venv
key: v1-dependencies-${{ hashFiles('**/requirements.txt') }}
restore-keys: v1-dependencies-
- name: Install Dependences
run: pip install -r requirements.txt -r requirements-dev.txt
- name: Run Setup Script
run: python setup.py install
- name: Linting
run: flake8
- name: Run Tests
run: make test