chore(ci): улучшил конфигурацию CI/CD пайплайнов
This commit is contained in:
@@ -12,6 +12,8 @@ jobs:
|
||||
name: Build & Test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
artifact-name: ${{ steps.meta.outputs.artifact-name }}
|
||||
steps:
|
||||
@@ -28,23 +30,25 @@ jobs:
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
|
||||
- name: Build
|
||||
run: ./gradlew clean bootJar --stacktrace --no-daemon
|
||||
|
||||
- name: Test
|
||||
run: ./gradlew test --stacktrace --no-daemon
|
||||
- name: Run CI quality gate
|
||||
run: ./gradlew clean check bootJar --stacktrace --no-daemon
|
||||
|
||||
- name: Set artifact name
|
||||
id: meta
|
||||
run: echo "artifact-name=build-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Upload build artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ steps.meta.outputs.artifact-name }}
|
||||
path: |
|
||||
build/libs/*.jar
|
||||
build/reports/detekt/**
|
||||
build/reports/ktlint/**
|
||||
build/reports/jacoco/**
|
||||
build/reports/**
|
||||
build/test-results/**
|
||||
build/jacoco/**
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
Reference in New Issue
Block a user