Skip to content

feat: Blurhash & new address pareser #12

feat: Blurhash & new address pareser

feat: Blurhash & new address pareser #12

name: CodeCov for Spring Boot
on:
push:
paths:
- '**/*.java' # Triggers the workflow only when .java files are changed
workflow_dispatch: # Allows manual triggering of the workflow
permissions:
contents: read # Grants read access to repository contents
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true # Cancels any in-progress runs of the same workflow and branch
jobs:
jacoco:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
# Checkout the repository
- uses: actions/checkout@v4
# Set up JDK 22
- name: Set up JDK 22
uses: actions/setup-java@v3
with:
java-version: "22"
distribution: "corretto"
# Set permissions for /tmp directory (if necessary)
- name: Set permissions for /tmp directory
run: sudo chmod -R 777 /tmp
# Decode and set up secrets
- name: Setup secrets
run: |
echo "${{ secrets.APPLICATION_YML }}" | base64 --decode > src/main/resources/application-secret.yml
mkdir -p src/main/resources/db/migration
echo "${{ secrets.V1_SQL }}" | base64 --decode > src/main/resources/db/migration/V1__Create_festivals_table.sql
echo "${{ secrets.BAD_WORD_LIST }}" | base64 --decode > src/main/resources/badwords.txt
mkdir -p src/test/resources
echo "${{ secrets.BAD_WORD_LIST }}" | base64 --decode > src/test/resources/badwords.txt
# Ensure Maven Wrapper is executable (if using Maven Wrapper)
- name: Ensure Maven Wrapper is executable
run: chmod +x mvnw
# Build and Run Tests with Maven (including JaCoCo)
- name: Build with Maven
run: ./mvnw clean verify -DskipTests=false
# Upload coverage to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: target/jacoco/jacoco.xml
fail_ci_if_error: true