Обновить .gitea/workflows/gitea-ci.yml
This commit is contained in:
@@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
cringehosting/cijdk:gradle_jdk21
|
cringehosting/cijdk:gradle_jdk21
|
||||||
@@ -14,4 +14,26 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Build and test project
|
- name: Build and test project
|
||||||
run:
|
run:
|
||||||
gradle build --no-daemon # - Includes test task
|
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