Skip to content

build(workflows): Add on_push and on_pull_request workflows #2

build(workflows): Add on_push and on_pull_request workflows

build(workflows): Add on_push and on_pull_request workflows #2

Workflow file for this run

name: On Pull Request
on:
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
onPullRequestJob:
env:
ANDROID_HOME: ${{ github.workspace }}/bin/androidSdk
name: Verify code base when pull request is published/updated
runs-on: macos-latest
# runs-on: ubuntu-20.04-16core # Larger github runner, with KVM acceleration
steps:
- name: Run checkout github action
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: 'true'
fetch-depth: 0
- name: Detect Arch
id: detect-arch
uses: ./config/actions/detect-arch
- name: Setup GitHub Runner workflow
uses: ./config/actions/setup-runner
- name: Download homebrew dependencies
run: |
brew bundle --no-lock
shell: bash
- name: Verify Conventional commit standards against latest git tag
run: |
cog check
shell: bash
- name: Lint script files
run: |
./.sh/lintProject "" "runOwaspDependencyChecker"
shell: bash
- name: Run gradle testing suite
run: |
./.sh/runTestingSuite.sh
shell: bash
- name: Upload results to sonarcloud
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
./.sh/uploadToSonar "PR" ${{ github.head_ref || github.ref_name }} ${{ github.event.number }}
shell: bash
- name: Bundle reports folder
uses: ./config/actions/bundle-reports
- name: Clean workspace
uses: ./config/actions/clean-workspace