mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-07 22:26:29 -04:00
Add CI (github and codecov) from branch Issue#19
This commit is contained in:
parent
f7f6d5628d
commit
ba990be6c5
13
.codecov.yml
Normal file
13
.codecov.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
codecov:
|
||||||
|
notify:
|
||||||
|
require_ci_to_pass: yes
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
threshold: 0.1%
|
||||||
|
patch:
|
||||||
|
default:
|
||||||
|
target: 100%
|
||||||
|
threshold: 20%
|
46
.github/workflows/pull_request.yml
vendored
Normal file
46
.github/workflows/pull_request.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
name: Pull requests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build_job:
|
||||||
|
name: Build Pull Request
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Set up JDK 11
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
|
||||||
|
- name: Build Project
|
||||||
|
run: bash contrib/build.sh
|
||||||
|
|
||||||
|
- name: Compile Project
|
||||||
|
run: |
|
||||||
|
cd android-libkiwixbuild
|
||||||
|
./gradlew androidSourcesJar build
|
||||||
|
|
||||||
|
- name: create unit coverage
|
||||||
|
run: |
|
||||||
|
cd android-libkiwixbuild
|
||||||
|
./gradlew createCodeCoverageReport
|
||||||
|
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v2
|
||||||
|
|
||||||
|
- name: Upload Coverage to GH-Actions
|
||||||
|
uses: actions/upload-artifact@v2.2.0
|
||||||
|
if: ${{ always() }}
|
||||||
|
with:
|
||||||
|
name: Tests Coverage Report
|
||||||
|
path: |
|
||||||
|
android-libkiwixbuild/build/coverage-report/
|
49
.github/workflows/release.yml
vendored
Normal file
49
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
name: Build Java-LibKiwix
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- '*'
|
||||||
|
- '*/**'
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
- '*/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Set up JDK 11
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
distribution: adopt
|
||||||
|
java-version: 11
|
||||||
|
|
||||||
|
- name: Building Project
|
||||||
|
run: bash contrib/build.sh
|
||||||
|
|
||||||
|
- name: Release build
|
||||||
|
run: |
|
||||||
|
cd android-libkiwixbuild
|
||||||
|
./gradlew assemble
|
||||||
|
|
||||||
|
- name: Genrate Source jar
|
||||||
|
run: |
|
||||||
|
cd android-libkiwixbuild
|
||||||
|
./gradlew androidSourcesJar
|
||||||
|
|
||||||
|
- name: Publish to MavenCentral
|
||||||
|
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
|
||||||
|
env:
|
||||||
|
ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
|
||||||
|
ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
|
||||||
|
signing.keyId: ${{ secrets.SIGNING_KEY_ID }}
|
||||||
|
siging.password: ${{ secrets.SIGNING_PASSWORD }}
|
||||||
|
siging.key: ${{ secrets.SIGNING_KEY }}
|
||||||
|
sonatypeStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
|
Loading…
x
Reference in New Issue
Block a user