Skip to content

Deploy Github Pages #16

Deploy Github Pages

Deploy Github Pages #16

Workflow file for this run

name: Code review
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
types: [opened, ready_for_review, synchronize, labeled]
branches:
- master
jobs:
SetUp:
runs-on: ubuntu-latest
steps:
- id: setVariables
name: Set variables
run: |
isFromMaster=${{ github.ref == 'refs/heads/master' }}
isManual=${{ github.event_name == 'workflow_dispatch' }}
echo "shouldRunAndroidDocumentation=${{ contains(github.event.pull_request.labels.*.name, 'documentation') }}" >> "$GITHUB_OUTPUT"
if [ ${{ github.event_name }} == workflow_dispatch ] || [ ${{ github.event_name }} == push ] || ([ ${{ github.event_name }} == pull_request ] && [ ${{ github.event.pull_request.draft }} == false ]); then
exit 0
else
exit 1
fi
outputs:
shouldRunAndroidDocumentation: ${{ steps.setVariables.outputs.shouldRunAndroidDocumentation }}
BuildAndRunTests:
needs: SetUp
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Job set up
uses: ./.github/actions/job-set-up
- name: Build
run: ./gradlew assembleDebug
- name: Run unit tests
run: ./gradlew clean testDebugUnitTest
Documentation:
needs: SetUp
uses: ./.github/workflows/docs.yml
with:
shouldRunAndroidDocumentation: ${{ needs.SetUp.outputs.shouldRunAndroidDocumentation }}
AllowMerge:
if: always()
runs-on: ubuntu-latest
needs: [ SetUp, BuildAndRunTests, Documentation ]
steps:
- run: |
if [ ${{ github.event_name }} == pull_request ] && [ ${{ join(github.event.pull_request.labels.*.name) == '' }} == true ]; then
exit 1
elif [ ${{ (contains(needs.Build.result, 'failure')) }} == true ] || [ ${{ (contains(needs.BuildAndRunTests.result, 'failure')) }} || [ ${{ (contains(needs.Documentation.result, 'failure')) }} == true ]; then
exit 1
else
exit 0
fi