Skip to content

Commit 89ef55b

Browse files
authored
Move to GitHub Actions (#1754)
1 parent 1bf04d1 commit 89ef55b

File tree

7 files changed

+68
-60
lines changed

7 files changed

+68
-60
lines changed

.github/workflows/android.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Android CI
2+
3+
on:
4+
- pull_request
5+
- push
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: set up JDK 1.8
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 1.8
16+
- name: Build with Gradle
17+
run: ./scripts/build.sh
18+
- name: Print Logs
19+
if: failure()
20+
run: ./scripts/print_build_logs.sh

.github/workflows/artifactory.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Artifactory
2+
3+
on:
4+
push:
5+
branches:
6+
- 'version-*-dev'
7+
8+
jobs:
9+
artifactory:
10+
runs-on: ubuntu-latest
11+
env:
12+
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
13+
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: set up JDK 1.8
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: 1.8
20+
- name: Publish to Artifactory
21+
run: ./scripts/artifactory.sh

.travis.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![FirebaseOpensource.com](https://img.shields.io/badge/Docs-firebaseopensource.com-orange.svg)](
44
https://firebaseopensource.com/projects/firebase/firebaseui-android
55
)
6-
[![Build Status](https://travis-ci.org/firebase/FirebaseUI-Android.svg?branch=master)](https://travis-ci.org/firebase/FirebaseUI-Android)
6+
[![Actions Status][gh-actions-badge]][gh-actions]
77

88
FirebaseUI is an open-source library for Android that allows you to
99
quickly connect common UI elements to [Firebase](https://firebase.google.com) APIs.
@@ -241,3 +241,6 @@ accept your pull requests.
241241
you are contributing.
242242
1. Ensure that your code has an appropriate set of unit tests which all pass.
243243
1. Submit a pull request targeting the latest dev branch.
244+
245+
[gh-actions]: https://github.com/firebase/FirebaseUI-Android/actions
246+
[gh-actions-badge]: https://github.com/firebase/FirebaseUI-Android/workflows/Android%20CI/badge.svg

scripts/artifactory.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
#!/usr/bin/env bash
2-
32
set -e
43

5-
VERSION_BRANCH_RE="version-[0-9\.]+-dev"
6-
7-
if [[ ($CI == "true") && !("${TRAVIS_BRANCH}" =~ $VERSION_BRANCH_RE) ]]; then
8-
echo "Not triggering artifactory for branch: ${TRAVIS_BRANCH}"
9-
exit 0
10-
fi
11-
12-
if [[ ($CI == "true") && ($TRAVIS_EVENT_TYPE != "push") ]]; then
13-
echo "Artifactory only triggered on 'push' builds."
14-
exit 0
15-
fi
16-
17-
184
./gradlew :library:prepareArtifacts
195
./gradlew :common:assembleRelease :common:prepareArtifacts :common:artifactoryPublish
206
./gradlew :auth:assembleRelease :auth:prepareArtifacts :auth:artifactoryPublish

scripts/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
cp library/google-services.json app/google-services.json
5+
cp library/google-services.json proguard-tests/google-services.json
6+
7+
./gradlew clean
8+
./gradlew assembleDebug proguard-tests:build check

scripts/print_build_logs.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
# tests
5+
cat app/build/reports/tests/testDebugUnitTest/index.html
6+
cat auth/build/reports/tests/testDebugUnitTest/index.html
7+
cat database/build/reports/tests/testDebugUnitTest/index.html
8+
cat storage/build/reports/tests/testDebugUnitTest/index.html
9+
10+
# app
11+
cat app/build/reports/checkstyle.html
12+
cat app/build/reports/lint-results.xml
13+
cat app/build/reports/lint-results.html
14+
cat app/build/reports/findbugs.html
15+
cat app/build/reports/pmd.html

0 commit comments

Comments
 (0)