Add SPDX generation using spdx-tools #1066
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |