Skip to content

Commit

Permalink
[CI] GitHub Actions
Browse files Browse the repository at this point in the history
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
bdevierno1 authored May 5, 2020
1 parent 3858c27 commit d0b3c43
Show file tree
Hide file tree
Showing 8 changed files with 991 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/Linter.yml
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 }}
Loading

0 comments on commit d0b3c43

Please sign in to comment.