Update MappingType; Update LLMUtils.kt prompt constructor #17
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: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build, Test, and Upload Artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.13.0 | |
- name: Cache Python dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Cache Hugging Face models | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/huggingface | |
key: huggingface-${{ runner.os }}-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
huggingface-${{ runner.os }}- | |
- name: Preload GraphCodeBERT model | |
run: | | |
mkdir -p ~/.cache/huggingface/transformers | |
python -c "from transformers import RobertaModel; RobertaModel.from_pretrained('microsoft/graphcodebert-base')" | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Grant execute permissions for Gradle wrapper | |
run: chmod +x ./gradlew | |
- name: Run Clean | |
run: ./gradlew clean | |
- name: Build Project | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: ./gradlew build | |
- name: Run Tests | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: ./gradlew test | |
- name: Generate Coverage Report | |
run: ./gradlew jacocoTestReport | |
- name: Upload Coverage Report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-report | |
path: build/reports/jacoco/test/html | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: build/reports/jacoco/test/jacocoTestReport.xml | |
flags: unittests | |
name: FractalFathom-CLI Coverage | |
fail_ci_if_error: true | |
- name: Build Annotations JAR | |
run: ./gradlew buildLib | |
- name: Build Fat JAR | |
run: ./gradlew fatJar | |
- name: Upload Annotations JAR | |
uses: actions/upload-artifact@v3 | |
with: | |
name: fractalfathom-annotations | |
path: build/libs/*-annotations.jar | |
- name: Upload Fat JAR | |
uses: actions/upload-artifact@v3 | |
with: | |
name: fractalfathom-cli-all | |
path: build/libs/*-all.jar |