fix: initial status loading issues. #192
@ -10,30 +10,44 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
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
|
||||
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||
run: git fetch --tags -p
|
||||
- uses: actions/setup-java@v4
|
||||
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: gradle
|
||||
- uses: gradle/actions/setup-gradle@v3
|
||||
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||
- uses: android-actions/setup-android@v3
|
||||
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||
- 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
|
||||
- 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
|
||||
- uses: KengoTODA/actions-setup-docker-compose@v1
|
||||
with:
|
||||
version: "2.23.3"
|
||||
# TESTS ARE RUN LOCALLY
|
||||
# TESTS ARE RUN LOCALLY
|
||||
# - uses: KengoTODA/actions-setup-docker-compose@v1
|
||||
# with:
|
||||
# version: "2.23.3"
|
||||
# - name: run selfoss
|
||||
# run: |
|
||||
# docker compose -f .gitea/workflows/assets/docker-compose.yml up -d
|
||||
- name: coverage
|
||||
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||
run: |
|
||||
./gradlew :koverHtmlReport
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: steps.check-android-changes.outputs.any_modified == 'true'
|
||||
with:
|
||||
name: coverage
|
||||
path: build/reports/kover/html
|
||||
|
@ -29,7 +29,16 @@ jobs:
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
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
|
||||
if: steps.check-api-changes.outputs.any_modified == 'true'
|
||||
uses: crowdin/github-action@v2
|
||||
with:
|
||||
config: './.gitea/workflows/assets/crowdin.yml'
|
||||
@ -42,8 +51,10 @@ jobs:
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
- name: wait
|
||||
if: steps.check-api-changes.outputs.any_modified == 'true'
|
||||
run: sleep 10s
|
||||
- name: download translations
|
||||
if: steps.check-api-changes.outputs.any_modified == 'true'
|
||||
uses: crowdin/github-action@v2
|
||||
with:
|
||||
config: './.gitea/workflows/assets/crowdin.yml'
|
||||
@ -56,17 +67,18 @@ jobs:
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
- name: Check for uncommitted changes
|
||||
if: steps.check-api-changes.outputs.any_modified == 'true'
|
||||
id: check-changes
|
||||
uses: mskri/check-uncommitted-changes-action@v1.0.1
|
||||
- name: Commit Changes
|
||||
if: steps.check-changes.outputs.changes != ''
|
||||
if: steps.check-api-changes.outputs.any_modified == 'true' && steps.check-changes.outputs.changes != ''
|
||||
run: |
|
||||
git config --global user.email aminecmi+giteadrone@pm.me
|
||||
git config --global user.name giteadrone
|
||||
git add ./androidApp/src/main/res/*
|
||||
git commit -m "translation: translation files"
|
||||
- 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
|
||||
with:
|
||||
author_name: giteadrone
|
||||
|
Loading…
x
Reference in New Issue
Block a user