mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +05:30
github: sync up workflow from APS
This commit is contained in:
parent
78b53e42de
commit
56914d20bb
1 changed files with 62 additions and 61 deletions
123
.github/workflows/ci.yml
vendored
123
.github/workflows/ci.yml
vendored
|
@ -13,87 +13,88 @@ jobs:
|
||||||
run-unit-tests:
|
run-unit-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Java 17
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@a12e082d834968c1847f782019214fadd20719f6
|
uses: actions/setup-java@v2.4.0
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
|
cache: 'gradle'
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
|
uses: actions/checkout@v2.4.0
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
uses: gradle/gradle-build-action@42faf281e611575a323584d89cc18967608d1c9d
|
uses: gradle/gradle-build-action@v2.1.0
|
||||||
with:
|
with:
|
||||||
arguments: test --stacktrace
|
arguments: test --stacktrace
|
||||||
|
|
||||||
- name: (Fail-only) upload test report
|
- name: (Fail-only) Upload test report
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2
|
uses: actions/upload-artifact@v2.3.1
|
||||||
with:
|
with:
|
||||||
name: Test report
|
name: Test report
|
||||||
path: app/build/reports
|
path: android/build/reports
|
||||||
|
|
||||||
stylecheck:
|
stylecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Java 17
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@a12e082d834968c1847f782019214fadd20719f6
|
uses: actions/setup-java@v2.4.0
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
|
cache: 'gradle'
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
|
uses: actions/checkout@v2.4.0
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
||||||
|
|
||||||
|
- name: Check codestyle with Spotless
|
||||||
|
uses: gradle/gradle-build-action@v2.1.0
|
||||||
|
with:
|
||||||
|
arguments: spotlessCheck
|
||||||
|
|
||||||
- name: Check codestyle with Spotless
|
|
||||||
uses: gradle/gradle-build-action@42faf281e611575a323584d89cc18967608d1c9d
|
|
||||||
with:
|
|
||||||
arguments: spotlessCheck
|
|
||||||
deploy-release-snapshot:
|
deploy-release-snapshot:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: "github.event_name == 'push'"
|
if: "github.event_name == 'push'"
|
||||||
needs: [ "run-unit-tests", "stylecheck" ]
|
needs: [ "run-unit-tests", "stylecheck" ]
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v2.4.0
|
||||||
|
with:
|
||||||
|
distribution: 'zulu'
|
||||||
|
java-version: '17'
|
||||||
|
cache: 'gradle'
|
||||||
|
|
||||||
- name: Setup Java 17
|
- name: Checkout repository
|
||||||
uses: actions/setup-java@a12e082d834968c1847f782019214fadd20719f6
|
uses: actions/checkout@v2.4.0
|
||||||
with:
|
|
||||||
distribution: 'zulu'
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Copy CI gradle.properties
|
||||||
uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Decrypt secrets
|
||||||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
run: scripts/signing-setup.sh "$ENCRYPT_KEY"
|
||||||
|
env:
|
||||||
|
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
||||||
|
|
||||||
- name: Decrypt secrets
|
- name: Build release app
|
||||||
run: scripts/signing-setup.sh "$ENCRYPT_KEY"
|
uses: gradle/gradle-build-action@v2.1.0
|
||||||
env:
|
with:
|
||||||
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
arguments: :android:assembleRelease
|
||||||
|
|
||||||
- name: Build release app
|
- name: Clean secrets
|
||||||
uses: gradle/gradle-build-action@42faf281e611575a323584d89cc18967608d1c9d
|
run: scripts/signing-cleanup.sh
|
||||||
with:
|
|
||||||
arguments: :android:assembleRelease
|
|
||||||
|
|
||||||
- name: Clean secrets
|
- name: Deploy snapshot
|
||||||
run: scripts/signing-cleanup.sh
|
run: scripts/deploy-snapshot.sh
|
||||||
|
env:
|
||||||
- name: Deploy snapshot
|
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
run: scripts/deploy-snapshot.sh
|
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
|
||||||
env:
|
SERVER_ADDRESS: ${{ secrets.SERVER_ADDRESS }}
|
||||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
SERVER_DESTINATION: ${{ secrets.SERVER_DESTINATION }}
|
||||||
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
|
SSH_PORT: ${{ secrets.SSH_PORT }}
|
||||||
SERVER_ADDRESS: ${{ secrets.SERVER_ADDRESS }}
|
|
||||||
SERVER_DESTINATION: ${{ secrets.SERVER_DESTINATION }}
|
|
||||||
SSH_PORT: ${{ secrets.SSH_PORT }}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue