Skip to content

Check Showcases

Check Showcases #1129

name: Check Showcases
on:
schedule:
- cron: "0 0,12 * * *" # run twice daily
push:
branches:
- master
paths:
- "showcases/**"
pull_request:
branches:
- "**"
paths:
- "showcases/**"
workflow_dispatch: {}
jobs:
check-index-showcases:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 16
- name: Prepare static artifacts
run: |
npm install
npm run check:showcases-index
test-showcases:
# except for pull request, make sure to run the pipeline only for default branch
if: github.event_name == 'pull_request' || (github.ref == 'refs/heads/master' && github.repository == 'finos/legend')
name: Run Compilation Check for Showcases
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "temurin"
cache: "maven"
# For PRs only want to run changed files
- name: Get Changed Files for PR
if: ${{ github.event_name == 'pull_request' }}
working-directory: ./showcases
run: echo "CHANGED_FILES=`git diff --name-only --diff-filter=AMR $GITHUB_BASE_REF...$GITHUB_HEAD_REF | paste -sd ','`" >> "$GITHUB_ENV"
- name: Run test
working-directory: ./showcases
run: |
if [ $SHOWCASE_LOCATIONS == "" ]; then
locations=data
else
locations=$SHOWCASE_LOCATIONS
fi
mvn versions:use-latest-versions
mvn -B -Dmaven.surefire.thread.count=$THREAD_COUNT -Dshowcase.locations=$locations test
env:
THREAD_COUNT: 3
SHOWCASE_LOCATIONS: ${{ env.CHANGED_FILES }}