Skip to content

Limit builds to the gwtproject repository #209

Limit builds to the gwtproject repository

Limit builds to the gwtproject repository #209

Workflow file for this run

# Run simple checks to make sure that the build is sane when any branch is pushed or pull
# request created. Comments or annotations will be added to a pull request in the case of
# style guide violations. Presently, tests are not run on pull requests.
name: Quick smoke test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout GWT itself into one directory
uses: actions/checkout@v2
with:
path: 'gwt'
# we need depth=2 to see which style violations overlap with the current changes
fetch-depth: 2
- name: Checkout GWT tools into a sibling directory
uses: actions/checkout@v2
with:
repository: 'gwtproject/tools'
path: 'tools'
- name: Set up JDK 8
# GWT presently requires Java8 to build, but can run on newer Java versions
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'temurin'
- name: Set up reviewdog for easier checks on the PR's checkstyle output
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Build, style/api checks, produce docs
# Presently this runs no tests at all, but could run quick tests
run: |
set -eux
cd gwt
# Set env vars to ensure we get the build we expect
export \
TZ=America/Los_Angeles \
ANT_OPTS=-Dfile.encoding=UTF8 \
ANT_OPTS=-Xmx2g
ant clean dist doc checkstyle apicheck
- name: Create pull request comments/annotations for checkstyle, even on failure
if: always() && github.event_name == 'pull_request'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eux
shopt -s extglob
cd gwt
for f in build/out/**/checkstyle*.xml ; do
echo $f
reviewdog -f=checkstyle -filter-mode=diff_context -reporter=github-pr-review -level=info < $f
done
- name: Upload checkstyle xml for manual review
uses: actions/upload-artifact@v2
if: always()
with:
name: checkstyle-reports
path: 'gwt/build/out/**/checkstyle*.xml'
retention-days: 5