forked from upstream-mirrors/OpenTracks
ci: merge workflows into a single pipeline with proper job dependencies
This commit is contained in:
@@ -1,35 +0,0 @@
|
|||||||
name: Build and Release APK
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
name: Build and Upload APK
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: 'cimg/android:2024.04-node'
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Build APKs
|
|
||||||
shell: bash
|
|
||||||
run: ./gradlew assembleDebug
|
|
||||||
|
|
||||||
- name: Upload to Gitea Releases
|
|
||||||
uses: ncipollo/release-action@v1
|
|
||||||
with:
|
|
||||||
tag: latest
|
|
||||||
name: "Latest Build (main)"
|
|
||||||
prerelease: true
|
|
||||||
allowUpdates: true
|
|
||||||
artifacts: "build/outputs/apk/**/*.apk"
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
name: CI Pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Android Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: 'cimg/android:2024.04-node'
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
shell: bash
|
||||||
|
run: ./gradlew lint
|
||||||
|
|
||||||
|
android-check:
|
||||||
|
name: Unit Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: 'cimg/android:2024.04-node'
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
shell: bash
|
||||||
|
run: ./gradlew testNightlyDebugUnitTest --stacktrace
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Build and Upload APK
|
||||||
|
needs: [lint, android-check]
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: 'cimg/android:2024.04-node'
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Build APKs
|
||||||
|
shell: bash
|
||||||
|
run: ./gradlew assembleDebug
|
||||||
|
|
||||||
|
- name: Upload to Gitea Releases
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
tag: latest
|
||||||
|
name: "Latest Build (main)"
|
||||||
|
prerelease: true
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: "build/outputs/apk/**/*.apk"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
name: Android Test
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
name: Android Lint
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: 'cimg/android:2024.04-node'
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
shell: bash
|
|
||||||
run: ./gradlew lint
|
|
||||||
|
|
||||||
android-check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: 'cimg/android:2024.04-node'
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
shell: bash
|
|
||||||
run: ./gradlew testNightlyDebugUnitTest --stacktrace
|
|
||||||
Reference in New Issue
Block a user