Repository navigation
Починить падение lint-джобы в CI #178
Workflow file for this run
This file contains hidden or 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: PR pipeline | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up JDK | |
| uses: ./.github/actions/setup-jdk | |
| - name: Build with Maven | |
| run: mvn -B package --file pom.xml | |
| - name: Update dependency graph | |
| uses: advanced-security/maven-dependency-submission-action@v5 | |
| continue-on-error: true | |
| with: | |
| directory: . | |
| maven-args: "-DmergeClassifiers=true" | |
| format: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up JDK | |
| uses: ./.github/actions/setup-jdk | |
| - name: Check formatting | |
| # -nsu безопасен: SNAPSHOT-зависимостей нет. | |
| # Полные координаты вместо префикса spotless: резолв префикса требует metadata из central и падает без кэша. | |
| run: mvn -B -nsu com.diffplug.spotless:spotless-maven-plugin:3.10.3:check --file pom.xml | |
| lint: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up JDK | |
| uses: ./.github/actions/setup-jdk | |
| - name: Restore checkstyle cache | |
| uses: actions/cache@v5 | |
| with: | |
| # Путь совпадает с cacheFile в pom.xml. | |
| path: target/checkstyle-cachefile | |
| key: checkstyle-${{ hashFiles('checkstyle.xml', 'pom.xml') }} | |
| restore-keys: checkstyle- | |
| - name: Check lint | |
| # -nsu безопасен: SNAPSHOT-зависимостей нет. | |
| # Полные координаты вместо префикса checkstyle: резолв префикса требует metadata из central и падает без кэша. | |
| run: mvn -B -nsu org.apache.maven.plugins:maven-checkstyle-plugin:3.6.0:check --file pom.xml | |
| junit: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up JDK | |
| uses: ./.github/actions/setup-jdk | |
| - name: Run tests | |
| run: mvn -B test --file pom.xml | |
| - name: Generate Allure HTML report | |
| # Версия совпадает с allure-maven.version в pom.xml. | |
| # Результат задания определяют тесты: генерация не маскирует их статус | |
| # и не роняет задание при отсутствии результатов. | |
| if: always() | |
| continue-on-error: true | |
| run: mvn -B io.qameta.allure:allure-maven:2.17.0:report --file pom.xml | |
| - name: Upload Allure raw results | |
| if: always() | |
| continue-on-error: true | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-results | |
| path: target/allure-results | |
| retention-days: 21 | |
| if-no-files-found: warn | |
| - name: Upload Allure HTML report | |
| if: always() | |
| continue-on-error: true | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-report | |
| path: target/allure-report | |
| retention-days: 21 | |
| if-no-files-found: warn |