Skip to content

Commit

Permalink
Update main.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
GoliTech authored Nov 1, 2023
1 parent 6d391da commit 722a962
Showing 1 changed file with 14 additions and 44 deletions.
58 changes: 14 additions & 44 deletions .github/workflows/main.yaml
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()

0 comments on commit 722a962

Please sign in to comment.