Skip to content

Commit

Permalink
Add API check for pull requests to main
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWoodworth committed Nov 6, 2023
1 parent 7ab65ff commit 47cb38d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Publish

# If these are changed, make sure the "test" workflow's triggers are updated as well
on:
push:
tags: [ 'v*' ]
Expand Down
33 changes: 31 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
name: Test

on: [ push, pull_request ]
on:
# All pull requests
pull_request: {}
# All but the "publish" workflow's push refs, since whose should already be tested
push:
tags-ignore: [ 'v*' ]
branches-ignore: [ 'main' ]

jobs:
publish:
test:
strategy:
matrix:
runner: [ ubuntu-latest, macos-latest, windows-latest ]

name: 'Test: ${{ matrix.runner }}'
runs-on: ${{ matrix.runner }}

steps:
- uses: actions/checkout@v3

Expand All @@ -21,3 +28,25 @@ jobs:

- name: Test
run: ./gradlew ciTest

api-check:
name: 'API Check'
runs-on: ubuntu-latest

# Only run API check on pull requests to main
if: github.event.pull_request.base.ref == 'main'

steps:
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Binary Compatibility
run: ./gradlew apiCheck

- name: Documentation
run: ./gradlew dokkaHtml

0 comments on commit 47cb38d

Please sign in to comment.