Skip to content

Commit

Permalink
Merge pull request #15 from Crazy-Marvin/rc-1.0.3
Browse files Browse the repository at this point in the history
Migrate CI to GitHub Actions
  • Loading branch information
CrazyMarvin authored Dec 17, 2019
2 parents 383ac4e + b8bb289 commit 60c4832
Show file tree
Hide file tree
Showing 26 changed files with 99 additions and 389 deletions.
22 changes: 10 additions & 12 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
codecov:
branch: master
notify:
require_ci_to_pass: yes
require_ci_to_pass: true

coverage:
precision: 2
round: down
range: "70...100"

status:
project: yes
patch: yes
changes: no
project: true
patch: true
changes: false

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
conditional: true
loop: true
method: false
macro: false

comment:
layout: "header, diff"
layout: diff
behavior: default
require_changes: no
require_changes: false
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on: push
jobs:
build:
runs-on: macOS-10.14
steps:
- name: "📥 Check-out"
uses: actions/checkout@v1
- name: "🧰 Install JDK"
uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jdk
- name: "🧰 Install Android SDK"
uses: malinskiy/action-android/install-sdk@release/0.0.5
with:
acceptLicense: yes
- name: "📁 Copy local CI properties"
run: cp ci/local.properties ./
- name: "🏗 Build"
run: ./gradlew assembleDebug
- name: "🧪 Android LINT"
run: ./gradlew lint
- name: "🧪 Code coverage"
run: ./gradlew jacocoTestReport
- name: "🧪 Unit test"
run: ./gradlew test
- name: "🧪 Integration test"
uses: malinskiy/action-android/emulator-run-cmd@release/0.0.5
with:
cmd: ./gradlew connectedAndroidTest
api: 25
tag: google_apis
abi: x86
- name: "📤 Upload code coverage"
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
yml: .codecov.yml
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy
on:
push:
branches:
- master
jobs:
deploy:
runs-on: macOS-10.14
steps:
- name: "📥 Check-out"
uses: actions/checkout@v1
- name: "🧰 Install JDK"
uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jdk
- name: "🧰 Install Android SDK"
uses: malinskiy/action-android/install-sdk@release/0.0.5
with:
acceptLicense: yes
- name: "🕶 Decrypt secret files"
run: |
cd secrets
gpg --quiet --batch --yes --decrypt --passphrase="${{ secrets.FILES_PASSPHRASE }}" --output secrets.tar secrets.tar.gpg
tar -xf secrets.tar
- name: "📁 Copy local CI properties"
run: cp ci/local.properties ./
- name: "🏗 Build"
run: ./gradlew assembleDebug
- name: "🚀 GitHub release"
run: ./gradlew githubRelease
- name: "🚀 Google Play publish"
run: ./gradlew publishRelease
85 changes: 0 additions & 85 deletions .travis.yml

This file was deleted.

14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Icon](art/icons/ic_launcher/legacy/ic_launcher_squircle_xxxhdpi.png)](art/icons/ic_launcher/ic_launcher_play_store.png)

# Metadata Remover App For Android
[![Build Status](https://img.shields.io/travis/Crazy-Marvin/MetadataRemover/master.svg?style=flat)](https://travis-ci.org/Crazy-Marvin/MetadataRemover)
[![Build Status](https://img.shields.io/github/workflow/status/Crazy-Marvin/MetadataRemover/CI?style=flat)](https://github.com/Crazy-Marvin/MetadataRemover/actions)
[![License](https://img.shields.io/github/license/Crazy-Marvin/MetadataRemover.svg?style=flat)](LICENSE.txt)
[![Last commit](https://img.shields.io/github/last-commit/Crazy-Marvin/MetadataRemover.svg?style=flat)](https://github.com/Crazy-Marvin/MetadataRemover/commits)
[![Releases](https://img.shields.io/github/downloads/Crazy-Marvin/MetadataRemover/total.svg?style=flat)](https://github.com/Crazy-Marvin/MetadataRemover/releases)
Expand Down Expand Up @@ -73,6 +73,18 @@ That way you stay <i>anonymous</i> and <i>safe</i> in internet, while your frien

<i>Happy sharing! 😽</i>

## Deployment

### Encoding secrets

```shell script
cd secrets
tar -cf secrets.tar --exclude=secrets.tar --exclude=secrets.tar.gpg --exclude=.gitignore .
gpg --symmetric --cipher-algo AES256 --output secrets.tar.gpg secrets.tar
```

The same password needs to be saved as `FILES_PASSPHRASE` variable
to this repository's [secrets](https://github.com/Crazy-Marvin/MetadataRemover/settings/secrets).

## Contributing

Expand Down
9 changes: 1 addition & 8 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,7 @@ kapt {
}

play {
serviceAccountCredentials = rootProject
.file("secret/api-7281121051860956110-977812-57e7308358e6.json")
.also { file ->
require(file.exists()) {
"Could not find Google Play credentials."
}
}

serviceAccountCredentials = rootProject.file("secret/api-7281121051860956110-977812-57e7308358e6.json")
track = "internal"
releaseStatus = "draft"
defaultToAppBundles = true
Expand Down
7 changes: 0 additions & 7 deletions ci/android-assemble

This file was deleted.

29 changes: 0 additions & 29 deletions ci/android-install-emulator

This file was deleted.

21 changes: 0 additions & 21 deletions ci/android-install-sdk

This file was deleted.

14 changes: 0 additions & 14 deletions ci/android-integration-tests

This file was deleted.

37 changes: 0 additions & 37 deletions ci/android-launch-emulator

This file was deleted.

7 changes: 0 additions & 7 deletions ci/android-lint

This file was deleted.

31 changes: 0 additions & 31 deletions ci/android-setup-sdk

This file was deleted.

Loading

0 comments on commit 60c4832

Please sign in to comment.