forked from sdnfv/openNetVM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR integrates Github actions into our main repo. Commit log: * Added Install Script and tested functionality w/o commits * Nit updates
- Loading branch information
1 parent
3858c27
commit d0b3c43
Showing
8 changed files
with
991 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Linter | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
jobs: | ||
Branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# If Branch name is not develop, comment | ||
- name: Test Branch Name | ||
if: github.base_ref != 'develop' | ||
uses: mshick/add-pr-comment@v1 | ||
with: | ||
message: | | ||
**Please Set PR to develop. 😊** | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
C: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Clone Repository | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# Perform lint on user's files. | ||
- name: User's Lint | ||
run: | | ||
chmod +x style/run-lint.sh | ||
style/run-lint.sh c | ||
Cppcheck: | ||
needs: [Branch] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install Requirements | ||
run: | | ||
sudo apt-get install cppcheck=1.82-1 | ||
- name: User's Lint | ||
run: | | ||
chmod +x style/run-lint.sh | ||
style/run-lint.sh cppcheck | ||
Python: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install Requirements | ||
run: | | ||
pip install pylint==2.4.4 | ||
- name: Run Pylint | ||
run: | | ||
chmod +x style/run-lint.sh | ||
style/run-lint.sh python | ||
Shell: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install Requirements | ||
run: | | ||
sudo apt install xz-utils | ||
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/v0.7.0/shellcheck-v0.7.0.linux.x86_64.tar.xz" | tar -xJv | ||
sudo cp "shellcheck-v0.7.0/shellcheck" /usr/bin/ | ||
- name: User's Lint | ||
run: | | ||
chmod +x style/run-lint.sh | ||
style/run-lint.sh shell | ||
Comment: | ||
needs: [Branch,C,Cppcheck,Python,Shell] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Add Comment | ||
uses: mshick/add-pr-comment@v1 | ||
with: | ||
message: | | ||
**All Lint Tests Passed!🚀** | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.