Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a GHA config for CI #336

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
push:
branches:
- master
paths-ignore:
- '.idea/**'
- '.gitattributes'
- '.github/**.json'
- '.gitignore'
- '.gitmodules'
- '**.md'
- 'LICENSE'
- 'NOTICE'
pull_request:
paths-ignore:
- '.idea/**'
- '.gitattributes'
- '.github/**.json'
- '.gitignore'
- '.gitmodules'
- '**.md'
- 'LICENSE'
- 'NOTICE'

jobs:
wrapper-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
- uses: gradle/gradle-build-action@v2
- run: ./gradlew lint

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
- uses: gradle/gradle-build-action@v2
- run: ./gradlew sample:assembleDebug
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ android {

defaultConfig {
applicationId "me.drakeet.multitype.sample"
minSdkVersion buildConfig.minSdkVersion
minSdkVersion 15
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/Goooler/MultiType/runs/8055186660?check_suite_focus=true

  Errors found:
  
  /home/runner/work/MultiType/MultiType/sample/src/main/res/drawable-xxxhdpi/img_01.webp: Error: WebP requires Android 4.0 (API 15); current minSdkVersion is 14 [WebpUnsupported]
  /home/runner/work/MultiType/MultiType/sample/src/main/res/drawable-xxxhdpi/img_10.webp: Error: WebP requires Android 4.0 (API 15); current minSdkVersion is 14 [WebpUnsupported]

targetSdkVersion buildConfig.targetSdkVersion
versionCode buildConfig.versionCode
versionName buildConfig.versionName
Expand Down