Initial QSfera import
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
||||
### Actual behaviour
|
||||
-Tell us what happens
|
||||
|
||||
### Expected behaviour
|
||||
-Tell us what should happen
|
||||
|
||||
### Steps to reproduce
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
|
||||
Can this problem be reproduced with the QSfera server?
|
||||
(url: https://<qsfera-server>)
|
||||
|
||||
|
||||
### Environment data
|
||||
Android version:
|
||||
|
||||
Device model:
|
||||
|
||||
Stock or customized system:
|
||||
|
||||
Android app version:
|
||||
|
||||
Server version:
|
||||
|
||||
### Logs
|
||||
#### Web server error log
|
||||
```
|
||||
Insert your webserver log here
|
||||
```
|
||||
|
||||
#### Server log
|
||||
```
|
||||
Insert your QSfera server log here
|
||||
```
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "gradle" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
labels:
|
||||
- "Dependencies"
|
||||
commit-message:
|
||||
prefix: "feat"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "feat"
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Android Unit Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew assembleDebug
|
||||
|
||||
- name: Run unit tests
|
||||
run: ./gradlew testDebugUnitTest --continue
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
name: Build unsigned QSfera APK
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
build_flavor:
|
||||
description: "Flavor to build"
|
||||
type: choice
|
||||
required: true
|
||||
default: "qa"
|
||||
options:
|
||||
- qa
|
||||
build_type:
|
||||
description: "Type to build"
|
||||
type: choice
|
||||
required: true
|
||||
default: "Debug" # uppercase for Gradle build type
|
||||
options:
|
||||
- Debug
|
||||
version:
|
||||
description: "Version to build (commit, branch or tag)"
|
||||
type: string
|
||||
default: "main"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build_apk:
|
||||
name: Build unsigned QSfera APK
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
artifact_name: ${{ steps.set_artifact.outputs.artifact_name }}
|
||||
commit_hash: ${{ steps.commit.outputs.commit_hash }}
|
||||
|
||||
steps:
|
||||
- name: Checkout current repo
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.version }}
|
||||
|
||||
- name: Get commit hash
|
||||
id: commit
|
||||
run: |
|
||||
COMMIT_HASH=$(git rev-parse HEAD)
|
||||
echo "Commit hash: $COMMIT_HASH"
|
||||
echo "commit_hash=$COMMIT_HASH" >> $GITHUB_OUTPUT
|
||||
echo "commit_hash=$COMMIT_HASH" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup JDK
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Cache Gradle
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Build APK
|
||||
run: |
|
||||
FLAVOR="${{ inputs.build_flavor }}"
|
||||
BUILD_TYPE="${{ inputs.build_type }}"
|
||||
FLAVOR_TASK="$(tr '[:lower:]' '[:upper:]' <<< "${FLAVOR:0:1}")${FLAVOR:1}"
|
||||
./gradlew clean assemble${FLAVOR_TASK}${BUILD_TYPE} -PversionCode=${{ github.run_number }}
|
||||
|
||||
- name: Set artifact name
|
||||
id: set_artifact
|
||||
run: |
|
||||
DATE=$(date +%Y%m%d_%H%M)
|
||||
COMMIT=$(git rev-parse --short HEAD)
|
||||
FLAVOR="${{ inputs.build_flavor }}"
|
||||
BUILD_TYPE="$(echo "${{ inputs.build_type }}" | tr '[:upper:]' '[:lower:]')"
|
||||
NAME="QSfera-${FLAVOR}-${COMMIT}-${DATE}-${GITHUB_RUN_NUMBER}.apk"
|
||||
|
||||
APK_PATH=$(find ./qsferaApp/build/outputs/apk/$FLAVOR/$BUILD_TYPE/ -name "*.apk" -print -quit)
|
||||
|
||||
echo "$APK_PATH"
|
||||
if [ -z "$APK_PATH" ]; then
|
||||
echo "APK not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp "$APK_PATH" "./$NAME"
|
||||
echo "$NAME"
|
||||
|
||||
# Publish as output
|
||||
echo "artifact_name=$NAME" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.set_artifact.outputs.artifact_name }}
|
||||
path: ./${{ steps.set_artifact.outputs.artifact_name }}
|
||||
compression-level: 0
|
||||
|
||||
- name: Upload APK to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: build-tester-apk-${{ github.run_number }}
|
||||
target_commitish: ${{ env.commit_hash }}
|
||||
name: build-tester-apk build ${{ github.run_number }}
|
||||
files: ${{ steps.set_artifact.outputs.artifact_name }}
|
||||
prerelease: true
|
||||
generate_release_notes: false
|
||||
body: Built from ${{ env.commit_hash }}
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
name: Detekt
|
||||
|
||||
# Controls when the action will run. Workflow runs when manually triggered using the UI
|
||||
# or API.
|
||||
on:
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
Detekt:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
|
||||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
||||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
- name: detekt execution
|
||||
run: ./gradlew detekt
|
||||
@@ -0,0 +1,13 @@
|
||||
name: "Validate Gradle Wrapper"
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
validation:
|
||||
name: "Validation"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: gradle/wrapper-validation-action@v3
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
name: "Push source language to Transifex"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
push-translations:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: l10n-push-source
|
||||
uses: transifex/cli-action@v2
|
||||
with:
|
||||
token: ${{ secrets.TX_TOKEN }}
|
||||
args: push -s
|
||||
Reference in New Issue
Block a user