Reviewing indraprasetya154's code changes π #3
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
# AI enabled code reviews using devai | |
# - Requires GCP service account stored in GOOGLE_API_CREDENTIALS secret | |
name: GenAI For Developers | |
run-name: Reviewing ${{ github.actor }}'s code changes π | |
on: [push, workflow_dispatch] | |
env: | |
LOCATION: us-central1 | |
PROJECT_ID: '${{ secrets.PROJECT_ID }}' | |
JIRA_CLOUD: true | |
jobs: | |
DevAI-Reviews: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: List files in the repository | |
run: | | |
ls ${{ github.workspace }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11.7' | |
- run: cd ${{ github.workspace }}/devai-cli | |
- run: pip install virtualenv | |
- run: virtualenv venv | |
- run: source venv/bin/activate | |
- run: pip install -r ${{ github.workspace }}/devai-cli/src/requirements.txt | |
- run: pip install --editable ${{ github.workspace }}/devai-cli/src | |
- name: Authorize. with GCP | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_API_CREDENTIALS }}' | |
project_id: '${{ secrets.PROJECT_ID }}' | |
- name: Test Coverage Review | |
run: echo '## Test Coverage Review Results π' >> $GITHUB_STEP_SUMMARY | |
- run: echo "$(devai review testcoverage -c ${{ github.workspace }}/sample-app/src)" >> $GITHUB_STEP_SUMMARY | |
shell: bash | |
- name: Code Review | |
run: echo '## Code Review Results π' >> $GITHUB_STEP_SUMMARY | |
- run: echo "$(devai review code -c ${{ github.workspace }}/sample-app/src/main/java/anthos/samples/bankofanthos/balancereader)" >> $GITHUB_STEP_SUMMARY | |
shell: bash | |
- name: Performance Review | |
run: echo '## Performance Review Results π' >> $GITHUB_STEP_SUMMARY | |
- run: echo "$(devai review performance -c ${{ github.workspace }}/sample-app/src/main/java/anthos/samples/bankofanthos/balancereader)" >> $GITHUB_STEP_SUMMARY | |
shell: bash | |
- name: Security Review | |
run: echo '## Security Review Results π' >> $GITHUB_STEP_SUMMARY | |
- run: echo "$(devai review security -c ${{ github.workspace }}/sample-app/src/main/java/anthos/samples/bankofanthos/balancereader)" >> $GITHUB_STEP_SUMMARY | |
shell: bash | |
- name: Blockers Review | |
run: echo '## Blockers Review Results π' >> $GITHUB_STEP_SUMMARY | |
- run: echo "$(devai review blockers -c ${{ github.workspace }}/sample-app/pom.xml)" >> $GITHUB_STEP_SUMMARY | |
shell: bash | |