Add a dedicated CI workflow for data loader CLI #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI for CLI | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| data_loader_ci: | |
| name: Build Data Loader CLI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set version | |
| id: version | |
| run: | | |
| VERSION=$(echo "${GITHUB_REF}" | sed -e "s#refs/tags/v##g") | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Set up JDK 8 and 11 (default 8) | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: | | |
| 11 | |
| 8 | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Gradle Data Loader CLI build | |
| run: ./gradlew :data-loader:cli:build --no-daemon --stacktrace | |
| - name: Cleanup Gradle cache | |
| run: | | |
| rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
| rm -f ~/.gradle/caches/modules-2/gc.properties |