Skip to content

Add unit tests to common #164

Add unit tests to common

Add unit tests to common #164

name: Check for api changes
on: pull_request
jobs:
check-for-api-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/[email protected]
with:
ref: ${{ github.base_ref }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Generate the api file
run: |
./gradlew generativeai:exportApi --no-daemon
- name: Save public.api from master
run: mv generativeai/public.api ~/public.api
- name: Checkout branch
uses: actions/[email protected]
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Copy saved api to branch
run: mv ~/public.api generativeai/public.api
- name: Run api warning task
run: |
./gradlew generativeai:warnAboutApiChanges --no-daemon
- name: Add PR Comment
if: ${{ hashFiles('api_changes.md') != '' }}
uses: marocchino/[email protected]
with:
header: api_changes
path: build/api_changes.md
- name: Remove old PR Comment
if: ${{ hashFiles('api_changes.md') == '' }}
uses: marocchino/[email protected]
with:
header: api_changes
delete: true