Skip to content

chore: logback for aws key setup #85

chore: logback for aws key setup

chore: logback for aws key setup #85

Workflow file for this run

name: Lint and Test with coverage
on:
pull_request:
branches:
- develop
- main
jobs:
ktlint:
name: Check kotlin lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: ktLint
uses: ScaCap/action-ktlint@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
fail_on_error: true
level: warning
test:
name: Execute test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Execute unit test
run: ./gradlew unitTest
- name: Execute integration test
run: ./gradlew integrationTest
- name: Register test results as comments in PR
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: "build/test-results/**/*.xml"
- name: If test fails, register a Check comment on the failed code line
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: build/test-results/**/*.xml
token: ${{ secrets.GITHUB_TOKEN }}
- name: If build fails, notify as Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Build Failure Notification
fields: repo, message, commit, author, action, eventName, ref, workflow, job, took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: ${{ failure() }}
coverage:
needs: test
name: Execute coverage
continue-on-error: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Execute jacoco coverage
run: ./gradlew jacocoTestReport
- name: Register test coverage as a comment in PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
title: 📝 테스트 커버리지 리포트입니다
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 50
min-coverage-changed-files: 50
pass-emoji: ':green_circle:'
fail-emoji: ':red_circle:'