Обновить .gitea/workflows/gitea-ci.yml
This commit is contained in:
@@ -4,7 +4,7 @@ on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
cringehosting/cijdk:gradle_jdk21
|
||||
@@ -15,3 +15,25 @@ jobs:
|
||||
- name: Build and test project
|
||||
run:
|
||||
gradle build --no-daemon # - Includes test task
|
||||
|
||||
checkstyle:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
cringehosting/cijdk:gradle_jdk21
|
||||
|
||||
steps:
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Check Google style accordance
|
||||
run:
|
||||
echo "Checking Google Java style accordance"
|
||||
echo "Two messages emerge in case of success..." \
|
||||
"...and more other way..." \
|
||||
"...and then pipeline fails"
|
||||
echo "Getting checkstyle jar"
|
||||
wget https://github.com/checkstyle/checkstyle/releases/download/checkstyle-12.1.0/checkstyle-12.1.0-all.jar
|
||||
echo "Getting google checkstyle"
|
||||
wget https://raw.githubusercontent.com/checkstyle/checkstyle/master/src/main/resources/google_checks.xml
|
||||
export command="java -jar checkstyle-12.1.0-all.jar -c ./google_checks.xml ./app/src/"
|
||||
$command
|
||||
test $($command | wc -l) -le 2
|
||||
|
||||
Reference in New Issue
Block a user