diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e075815 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 0000000..b2ab7c1 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,18 @@ +name: Enable Auto Merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + auto-merge: + runs-on: ubuntu-latest + if: ${{ github.actor == 'wbrawner' || github.actor == 'dependabot[bot]' }} + steps: + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --rebase "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GH_TOKEN}} + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..986679f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,57 @@ +name: Test + +on: + pull_request: + +jobs: + validate: + runs-on: ubuntu-latest + name: Validate + steps: + - uses: actions/checkout@v2 + - name: set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + unit_test: + name: Run Unit Tests + runs-on: ubuntu-latest + needs: + - validate + steps: + - name: Run unit tests + uses: gradle/gradle-build-action@v2 + with: + arguments: testPlayDebugUnitTest + - name: Publish JUnit Results + uses: dorny/test-reporter@v1 + if: always() + with: + name: Unit Test Results + path: "*/build/test-results/*/*.xml" + reporter: java-junit + fail-on-error: true + ui_tests: + runs-on: ubuntu-latest + name: Run UI Tests + needs: + - validate + steps: + - name: Build with Gradle + uses: gradle/gradle-build-action@v2 + with: + arguments: assemblePlayDebug assemblePlayDebugAndroidTest + - name: Grant execute permission for flank_auth.sh + run: chmod +x flank_auth.sh + - name: Add auth for flank + env: + GCLOUD_KEY: ${{ secrets.GCLOUD_KEY }} + run: | + ./flank_auth.sh + - name: Run UI tests + uses: gradle/gradle-build-action@v2 + with: + arguments: runFlank \ No newline at end of file