-
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.
- Loading branch information
Showing
1 changed file
with
14 additions
and
44 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 |
---|---|---|
@@ -1,56 +1,26 @@ | ||
name: Django # workflow name | ||
name: Java # workflow name | ||
|
||
on: | ||
push: | ||
branches: # similar to "only" in GitLab | ||
- main | ||
|
||
jobs: | ||
build: | ||
sast_spotbugs: | ||
runs-on: ubuntu-20.04 # similar to "image" in GitLab | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' | ||
|
||
- run: | | ||
pip3 install --upgrade virtualenv | ||
virtualenv env | ||
source env/bin/activate | ||
pip install -r requirements.txt | ||
python manage.py check | ||
test: | ||
runs-on: ubuntu-20.04 | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
wget https://github.com/spotbugs/spotbugs/releases/download/4.7.3/spotbugs-4.7.3.zip | ||
unzip spotbugs-4.7.3.zip | ||
echo -e "\nexport PATH=\$PATH:/spotbugs-4.7.3/bin" >> ~/.bashrc | ||
source ~/.bashrc | ||
chmod +x /spotbugs-4.7.3/bin/spotbugs | ||
apt update && apt install default-jdk -y | ||
spotbugs -xml -output spotbugs-output.xml . | ||
continue-on-error: true | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
python-version: '3.6' | ||
|
||
- run: | | ||
pip3 install --upgrade virtualenv | ||
virtualenv env | ||
source env/bin/activate | ||
pip install -r requirements.txt | ||
python manage.py test taskManager | ||
integration: | ||
runs-on: ubuntu-20.04 | ||
needs: test | ||
steps: | ||
- run: echo "This is an integration step" | ||
- run: exit 1 | ||
continue-on-error: true | ||
|
||
prod: | ||
runs-on: ubuntu-20.04 | ||
needs: integration | ||
steps: | ||
- run: echo "This is a deploy step." | ||
name: spotBugs | ||
path: spotbugs-output.xml | ||
if: always() |