Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build_pull_request.yml #9

Merged
merged 5 commits into from
Mar 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Android CI

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
env:
NASA_API_KEY: ${{ secrets.NASA_API_KEY }} # This line sets the API key as an environment variable

steps:
- uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin' # Temurin is a reliable distribution of OpenJDK

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Build debug APK
run: ./gradlew assembleDebug

- name: Run unit tests
run: ./gradlew test
Loading