-
Notifications
You must be signed in to change notification settings - Fork 186
88 lines (87 loc) · 2.67 KB
/
pull_request.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Pull Request Lint and Test
on: pull_request
jobs:
Prospector_Linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1 #equivlent to running git fetch and git checkout latest
- uses: actions/setup-python@v1 # setup python3 environment
with:
python-version: '3.8'
- name: Setup
run: |
sudo apt-get install -y attr
pip install --upgrade pip
pip install .
- name: Prospector Linting
run: |
pip install prospector>=1.5.1
prospector --version
prospector
Commit_Message_Linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Setup
run: |
sudo apt-get install -y attr
pip install --upgrade pip
pip install .
- name: Commit Message Linting
run: python ci/test_commit_message.py
Security_Linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Setup
run: |
sudo apt-get install -y attr
pip install --upgrade pip
pip install .
- name: Security Linting
run: |
pip install bandit>=1.6
c=`python ci/evaluate_docs.py`; if [ -z $c ]; then echo "No .py files to lint"; else echo $c | xargs bandit; fi
Test_Changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Setup
run: |
sudo apt-get update && sudo apt-get install -y attr openjdk-8-jdk-headless maven
pip install --upgrade pip
pip install .
docker pull photon:3.0 && docker save photon:3.0 > photon.tar
# build SPDX validation tool from source
git clone https://github.com/spdx/tools-java.git && cd tools-java
export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
mvn clean install && cd ..
- name: Test Changes
run: python ci/test_files_touched.py
Test_Coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Setup
run: |
sudo apt-get install -y attr
pip install --upgrade pip
pip install .
- name: Test Coverage
run: |
pip install coverage
pip install .
coverage run -m unittest discover -s tests
coverage report