Skip to content
Merged
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
15 changes: 15 additions & 0 deletions .github/actions/android/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Common - Android'
description: 'Common setup for Android workflows'

runs:
using: "composite"
steps:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version-file: '.java-version'
distribution: 'adopt'
cache: 'gradle'
cache-dependency-path: ./gradle/libs.versions.toml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
26 changes: 26 additions & 0 deletions .github/actions/python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Common - Python'
description: 'Common setup for Python workflows'

inputs:
workspace:
description: 'The path to the Python project workspace'
required: false
default: ''

runs:
using: "composite"
steps:
- name: Install poetry
shell: bash
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: '${{ inputs.workspace }}/.python-version'
cache: 'poetry'
- name: Configure Poetry
shell: bash
run: poetry config virtualenvs.create true
- name: Install dependencies
shell: bash
run: cd ./scripts/emoji_generator && poetry install --no-interaction --no-ansi
118 changes: 118 additions & 0 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Android CI

on:
push:
branches:
- develop
paths-ignore:
- ".github/actions/python/**"
- ".github/workflows/python-ci.yml"
- "app/src/main/**"
- "scripts/emoji_generator/**"
pull_request:
branches:
- develop
paths-ignore:
- ".github/actions/python/**"
- ".github/workflows/python-ci.yml"
- "app/src/main/**"
- "scripts/emoji_generator/**"

env:
CI: true

jobs:
wrapper-validation:
name: Wrapper Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: gradle/actions/wrapper-validation@v4

spotless:
name: Spotless Check
needs: wrapper-validation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Run Setup
uses: ./.github/actions/android
- name: Run spotless check
run: ./gradlew spotlessCheck

gradle-dokka:
name: Generate and deploy docs
needs: wrapper-validation
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v5
- name: Run Setup
uses: ./.github/actions/android
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate docs with dokka
run: ./gradlew dokkaHtmlMultiModule
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.7.3
with:
branch: docs # The branch the action should deploy to.
folder: dokka-docs # The folder the action should deploy.
token: ${{ steps.app-token.outputs.token }}

unit-test:
name: Unit Tests
needs: [wrapper-validation, spotless]
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v5
- name: Run Setup
uses: ./.github/actions/android
- name: Run tests
run: |
./gradlew emojify:preTest
./gradlew emojify:test --stacktrace
./gradlew emojify:postTest
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: always()
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
token: ${{ steps.app-token.outputs.token }}

publish-artifact:
name: Publish Artifact
needs: unit-test
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Run Setup
uses: ./.github/actions/android
- name: Run build
run: |
./gradlew emojify:preTest
./gradlew clean build --stacktrace
./gradlew emojify:postTest
- name: Publish to Local Maven
run: |
./gradlew publishMavenPublicationToMavenLocal
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: publications
path: ~/.m2/repository/io/wax911/emoji/
51 changes: 0 additions & 51 deletions .github/workflows/android-publish-artifact.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/android-spotless.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/android-unit-test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: auto-approve
name: Auto Approve

on:
pull_request_target:
Expand Down
62 changes: 0 additions & 62 deletions .github/workflows/emoji-generator-ci.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: greeting-first-time-contributor
name: Greeting

on: [ pull_request_target, issues ]

jobs:
greeting:
first-interaction:
name: Greet new contributors
runs-on: ubuntu-latest
permissions:
issues: write
Expand Down
Loading
Loading