diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 03600c2b..adbfed12 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,52 +1,13 @@ name: CI and automatic releases on: + pull_request: push: - branches-ignore: [gh-pages] + branches: [master] jobs: - static-checks: - name: Static checks - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1 - ci: - needs: static-checks - name: "Run static checks and tests" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-java@v1 - with: - java-version: 17 - - name: Cache Grade dependencies - uses: actions/cache@v1 - with: - path: ~/.gradle - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - uses: eskatos/gradle-command-action@v1 - with: - arguments: build - - name: Assemble instrumentation tests APK - uses: eskatos/gradle-command-action@v1 - with: - arguments: "app:assembleDebug app:assembleDebugAndroidTest" - - # Save APK in case we want to run it locally - - uses: actions/upload-artifact@v2 - with: - name: gateway.apk - path: app/build/outputs/apk/debug/app-debug.apk - - - name: Run tests on physical and virtual devices - uses: asadmansr/Firebase-Test-Lab-Action@v1.0 - with: - arg-spec: '.github/data/firebase-test-lab.yml:spec' - env: - SERVICE_ACCOUNT: ${{ secrets.CI_GCP_SERVICE_ACCOUNT }} + uses: relaycorp/shared-workflows/.github/workflows/android-app-ci.yml@main + secrets: + gcp_service_account: ${{ secrets.CI_GCP_SERVICE_ACCOUNT }} release: needs: ci diff --git a/.github/workflows/pr-title-validation.yml b/.github/workflows/pr-title-validation.yml deleted file mode 100644 index 67d26dfd..00000000 --- a/.github/workflows/pr-title-validation.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: "Validate PR title" -on: - pull_request: - types: - - opened - - edited - - synchronize - -jobs: - action-semantic-pull-request: - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v3.4.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/prs.yml b/.github/workflows/prs.yml new file mode 100644 index 00000000..d2f704bc --- /dev/null +++ b/.github/workflows/prs.yml @@ -0,0 +1,12 @@ +name: Process PRs + +on: + pull_request: + types: + - opened + - edited + - synchronize + +jobs: + pr-ci: + uses: relaycorp/shared-workflows/.github/workflows/pr-ci.yml@main diff --git a/.github/data/firebase-test-lab.yml b/app/firebase-test-lab.yml similarity index 100% rename from .github/data/firebase-test-lab.yml rename to app/firebase-test-lab.yml diff --git a/package.json b/package.json deleted file mode 100644 index af49ab7c..00000000 --- a/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "relaynet-gateway-android", - "devDependencies": { - "@semantic-release/commit-analyzer": "^8.0.1", - "@semantic-release/exec": "^5.0.0", - "@semantic-release/github": "^7.0.6", - "@semantic-release/release-notes-generator": "^9.0.1" - } -}