Merge pull request #33 from VishwajeetVT/trunk #76
This file contains 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: Build and Test | |
on: | |
push: | |
branches: | |
- trunk | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
pull_request: | |
branches: | |
- trunk | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
jobs: | |
build-and-test: | |
name: Build and Test Project | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Set up Java environment | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
# Cache Gradle dependencies | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches, ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
# Grant execution permissions for the Makefile | |
- name: Makefile Permissions | |
run: chmod +x Makefile | |
# Install Gradle Wrapper if needed | |
- name: Ensure Gradle Wrapper | |
run: | | |
if [ ! -f "./gradlew" ]; then | |
gradle wrapper | |
fi | |
# Run Makefile's pipeline target | |
- name: Run Pipeline | |
run: make pipeline |