New check and bundle actions

pull/2310/head
Alex Baker 12 months ago
parent 41c8a803a1
commit 6efac620c4

@ -0,0 +1,44 @@
name: Assemble bundle
on:
push:
permissions:
contents: read
jobs:
# check:
# uses: ./.github/workflows/check.yml
bundle:
runs-on: ubuntu-latest
# needs: [ check ]
steps:
- name: Decode Keystore
run: |
echo ${{ secrets.KEY_STORE }} | base64 -di > "${RUNNER_TEMP}"/keystore.jks
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Bundle
env:
KEY_PATH: ${{ runner.temp }}/keystore.jks
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
MAPBOX_KEY: ${{ secrets.MAPBOX_KEY }}
GOOGLE_KEY: ${{ secrets.GOOGLE_KEY }}
run: bundle exec fastlane bundle
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: release
path: app/build/outputs/**

@ -0,0 +1,56 @@
name: Run automated checks
on:
pull_request:
workflow_call:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Lint checks
run: bundle exec fastlane lint
- name: Archive lint reports
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: lint-reports
path: app/build/reports/*.html
test:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew -Pcoverage app:testGoogleplayDebugUnitTest app:connectedGoogleplayDebugAndroidTest
- name: Upload test reports
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: test-reports
path: app/build/reports/**

@ -1,46 +0,0 @@
name: Lint
on:
push:
paths-ignore:
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- README.md
- 'fastlane/**'
- .github/FUNDING.yml
pull_request:
paths-ignore:
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- README.md
- 'fastlane/**'
- .github/FUNDING.yml
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Lint checks
run: bundle exec fastlane lint
- name: Archive lint reports
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: lint-reports
path: app/build/reports/*.html

@ -1,43 +0,0 @@
name: Run tests
on:
push:
paths-ignore:
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- README.md
- 'fastlane/**'
- .github/FUNDING.yml
pull_request:
paths-ignore:
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- README.md
- 'fastlane/**'
- .github/FUNDING.yml
permissions:
contents: read
jobs:
test:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew -Pcoverage app:testGoogleplayDebugUnitTest app:connectedGoogleplayDebugAndroidTest
- name: Upload test reports
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: test-reports
path: app/build/reports/**

@ -40,4 +40,19 @@ platform :android do
lane :lint do
gradle(task: ":app:lintGoogleplayRelease :app:lintGenericRelease --no-configuration-cache")
end
desc "Bundle"
lane :bundle do
gradle(
task: "bundleGoogleplayRelease",
properties: {
"tasksKeyAlias": ENV["KEY_ALIAS"],
"tasksStoreFile": ENV["KEY_PATH"],
"tasksStorePassword": ENV["KEY_STORE_PASSWORD"],
"tasksKeyPassword": ENV["KEY_PASSWORD"],
"tasks_mapbox_key": ENV["MAPBOX_KEY"],
"tasks_google_key": ENV["GOOGLE_KEY"]
}
)
end
end

Loading…
Cancel
Save