chore: check changes for translations and android.
This commit is contained in:
parent
5e91724ee2
commit
18a17251ac
@ -10,30 +10,44 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: "Check android app changes"
|
||||||
|
id: check-android-changes
|
||||||
|
uses: tj-actions/changed-files@v45
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
androidApp/src/**
|
||||||
- name: Fetch tags
|
- name: Fetch tags
|
||||||
|
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||||
run: git fetch --tags -p
|
run: git fetch --tags -p
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
|
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
cache: gradle
|
cache: gradle
|
||||||
- uses: gradle/actions/setup-gradle@v3
|
- uses: gradle/actions/setup-gradle@v3
|
||||||
|
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||||
- uses: android-actions/setup-android@v3
|
- uses: android-actions/setup-android@v3
|
||||||
|
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||||
- name: Configure gradle...
|
- name: Configure gradle...
|
||||||
|
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||||
run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true" >> ~/.gradle/gradle.properties
|
run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true" >> ~/.gradle/gradle.properties
|
||||||
- name: Build and test
|
- name: Build and test
|
||||||
|
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||||
run: ./gradlew build -x testReleaseUnitTest -x testDebugUnitTest -x testGithubConfigReleaseUnitTest -x testGithubConfigDebugUnitTest # These tests will be done
|
run: ./gradlew build -x testReleaseUnitTest -x testDebugUnitTest -x testGithubConfigReleaseUnitTest -x testGithubConfigDebugUnitTest # These tests will be done
|
||||||
- uses: KengoTODA/actions-setup-docker-compose@v1
|
# TESTS ARE RUN LOCALLY
|
||||||
with:
|
# - uses: KengoTODA/actions-setup-docker-compose@v1
|
||||||
version: "2.23.3"
|
# with:
|
||||||
# TESTS ARE RUN LOCALLY
|
# version: "2.23.3"
|
||||||
# - name: run selfoss
|
# - name: run selfoss
|
||||||
# run: |
|
# run: |
|
||||||
# docker compose -f .gitea/workflows/assets/docker-compose.yml up -d
|
# docker compose -f .gitea/workflows/assets/docker-compose.yml up -d
|
||||||
- name: coverage
|
- name: coverage
|
||||||
|
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||||
run: |
|
run: |
|
||||||
./gradlew :koverHtmlReport
|
./gradlew :koverHtmlReport
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage
|
||||||
path: build/reports/kover/html
|
path: build/reports/kover/html
|
||||||
|
@ -29,7 +29,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: "Check translations changes"
|
||||||
|
id: check-translations-changes
|
||||||
|
uses: tj-actions/changed-files@v45
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
androidApp/src/main/res/values/strings.xml
|
||||||
- name: upload translation sources
|
- name: upload translation sources
|
||||||
|
if: steps.check-api-changes.outputs.any_modified == 'true'
|
||||||
uses: crowdin/github-action@v2
|
uses: crowdin/github-action@v2
|
||||||
with:
|
with:
|
||||||
config: './.gitea/workflows/assets/crowdin.yml'
|
config: './.gitea/workflows/assets/crowdin.yml'
|
||||||
@ -42,8 +51,10 @@ jobs:
|
|||||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||||
- name: wait
|
- name: wait
|
||||||
|
if: steps.check-api-changes.outputs.any_modified == 'true'
|
||||||
run: sleep 10s
|
run: sleep 10s
|
||||||
- name: download translations
|
- name: download translations
|
||||||
|
if: steps.check-api-changes.outputs.any_modified == 'true'
|
||||||
uses: crowdin/github-action@v2
|
uses: crowdin/github-action@v2
|
||||||
with:
|
with:
|
||||||
config: './.gitea/workflows/assets/crowdin.yml'
|
config: './.gitea/workflows/assets/crowdin.yml'
|
||||||
@ -56,17 +67,18 @@ jobs:
|
|||||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||||
- name: Check for uncommitted changes
|
- name: Check for uncommitted changes
|
||||||
|
if: steps.check-api-changes.outputs.any_modified == 'true'
|
||||||
id: check-changes
|
id: check-changes
|
||||||
uses: mskri/check-uncommitted-changes-action@v1.0.1
|
uses: mskri/check-uncommitted-changes-action@v1.0.1
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
if: steps.check-changes.outputs.changes != ''
|
if: steps.check-api-changes.outputs.any_modified == 'true' && steps.check-changes.outputs.changes != ''
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email aminecmi+giteadrone@pm.me
|
git config --global user.email aminecmi+giteadrone@pm.me
|
||||||
git config --global user.name giteadrone
|
git config --global user.name giteadrone
|
||||||
git add ./androidApp/src/main/res/*
|
git add ./androidApp/src/main/res/*
|
||||||
git commit -m "translation: translation files"
|
git commit -m "translation: translation files"
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
if: steps.check-changes.outputs.changes != ''
|
if: steps.check-api-changes.outputs.any_modified == 'true' && steps.check-changes.outputs.changes != ''
|
||||||
uses: appleboy/git-push-action@v1.0.0
|
uses: appleboy/git-push-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
author_name: giteadrone
|
author_name: giteadrone
|
||||||
|
Loading…
x
Reference in New Issue
Block a user