Skip to content
name: promotion-notifier-backend-ci
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: ./promotion-notifier-backend
- name: Build with Gradle
run: ./gradlew build -i
working-directory: ./promotion-notifier-backend
- name: Run integration tests
run: ./gradlew integTest -i
working-directory: ./promotion-notifier-backend
- name: Generate coverage report
run: ./gradlew codeCoverageReport
working-directory: ./promotion-notifier-backend
- name: Upload coverage report
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${{secrets.CODECOV_TOKEN}}
working-directory: ./promotion-notifier-backend