Skip to content

Bump org.slf4j:slf4j-api from 1.7.26 to 2.0.10 #154

Bump org.slf4j:slf4j-api from 1.7.26 to 2.0.10

Bump org.slf4j:slf4j-api from 1.7.26 to 2.0.10 #154

Workflow file for this run

# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ g11n-cldr-pattern ]
pull_request:
branches: [ g11n-cldr-pattern ]
env:
TZ: Asia/Shanghai
jobs:
pre-process:
name: Pre process
runs-on: ubuntu-latest
outputs:
were-only-docs-updated: ${{ steps.were-only-docs-updated-action.outputs.were-only-docs-updated }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2.
- name: Get commit range
id: get-commit-range-action
uses: ./.github/actions/get-commit-range-action
- name: Were only docs updated
id: were-only-docs-updated-action
uses: ./.github/actions/were-only-docs-updated-action
with:
commit-range: ${{ steps.get-commit-range-action.outputs.commit-range }}
check-header:
name: Check Header
runs-on: ubuntu-latest
needs: pre-process
if: needs.pre-process.outputs.were-only-docs-updated != 'yes'
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2.
- name: Get commit range
id: get-commit-range-action
uses: ./.github/actions/get-commit-range-action
- name: Check header
run: |
git clone --branch=devops https://github.com/vmware/singleton.git devops
cp $GITHUB_WORKSPACE/devops/check_headers.py .
chmod +x check_headers.py
git diff ${{ steps.get-commit-range-action.outputs.commit-range }} --stat
git diff --name-only --diff-filter=d ${{ steps.get-commit-range-action.outputs.commit-range }}
python ./check_headers.py -f "$(git diff --name-only --diff-filter=d ${{ steps.get-commit-range-action.outputs.commit-range }})"
unit-test:
name: Unit Test
runs-on: ubuntu-latest
needs: pre-process
if: needs.pre-process.outputs.were-only-docs-updated != 'yes'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Unit test
run: |
./gradlew test jacocoTestReport
- name: Upload Codecov report for g11n-cldr-pattern
uses: codecov/codecov-action@v2
with:
files: ./build/reports/jacoco.xml
flags: g11n-cldr-pattern
security-analysis:
name: Security Analysis
runs-on: ubuntu-latest
needs: pre-process
if: needs.pre-process.outputs.were-only-docs-updated != 'yes'
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['java']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
codacy-analysis-cli:
name: Codacy Analysis CLI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@master
with:
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@main
with:
sarif_file: results.sarif
smoke-test:
name: Smoke Test
runs-on: ubuntu-latest
needs: pre-process
if: needs.pre-process.outputs.were-only-docs-updated != 'yes'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Set up Python3
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Smoke Test
run: |
pip install ddt datetime openpyxl zipfile37 JPype1
git clone --branch=devops https://github.com/vmware/singleton.git devops
mv $GITHUB_WORKSPACE/devops/autotest/cldrpattern/* .
sudo cp HTMLTestRunner.py /usr/lib/python3.10
git clone --branch=g11n-java-client https://github.com/vmware/singleton.git g11n-java-client
cd g11n-java-client
./gradlew clean build -x test
mkdir -p ../java-client-sample/lib
mkdir -p ../jarpath
cp build/libs/singleton-client-java-0.1.0.jar ../java-client-sample/lib
cd ../
./gradlew build -x test
cp build/libs/i18n-patterns-core-0.11.0.jar java-client-sample/lib
cp build/libs/i18n-patterns-core-0.11.0.jar jarpath
cd java-client-sample
sudo chmod +x gradlew
./gradlew build -x test
cp build/libs/sample-vip4java-1.0.jar ..
cd ..
python test.py