-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #367 from bitmovin/feature/split-CI-workflow-to-op…
…timize-checks Split CI checks based on technology stack
- Loading branch information
Showing
3 changed files
with
240 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: CI (Android) | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/ci-android.yml' | ||
- 'package.json' | ||
- 'yarn.lock' | ||
- 'android/**' | ||
- 'example/android/**' | ||
- 'example/package.json' | ||
- 'example/yarn.lock' | ||
|
||
push: | ||
branches: [development] | ||
paths: | ||
- '.github/workflows/ci-android.yml' | ||
- 'package.json' | ||
- 'yarn.lock' | ||
- 'android/**' | ||
- 'example/android/**' | ||
- 'example/package.json' | ||
- 'example/yarn.lock' | ||
|
||
concurrency: | ||
group: ci-android-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
NO_FLIPPER: 1 | ||
|
||
jobs: | ||
code-style-android: | ||
name: Code style Android | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
|
||
- name: Set up Gradle cache | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
cache-read-only: ${{ github.ref != 'refs/heads/development' }} | ||
|
||
- name: Check code style | ||
run: ./gradlew ktlintCheck | ||
working-directory: android | ||
|
||
test-build-android: | ||
name: Build Android | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node and npm registry | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
registry-url: 'https://registry.npmjs.org/' | ||
cache: 'yarn' | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
|
||
- name: Install node_modules | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Install node_modules (example/) | ||
run: yarn install --frozen-lockfile --cwd example | ||
|
||
- name: Install node_modules (integration_test/) | ||
run: yarn install --frozen-lockfile --cwd integration_test | ||
|
||
- name: Set up Gradle cache | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
cache-read-only: ${{ github.ref != 'refs/heads/development' }} | ||
|
||
- name: Build Android example | ||
run: ./gradlew assembleDebug --build-cache | ||
working-directory: example/android | ||
|
||
- name: Build Android integration test host app | ||
run: ./gradlew assembleDebug --build-cache | ||
working-directory: integration_test/android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.