Skip to content

Commit

Permalink
[project]Fix centos unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryjzhang committed Dec 11, 2024
1 parent 215391b commit 2567742
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/centos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt'

- name: Reset DNF repositories
run: |
cd /etc/yum.repos.d/
Expand All @@ -29,21 +35,11 @@ jobs:
- name: Update DNF package index
run: dnf makecache

- name: Install Java and Maven with retry
- name: Install Maven with retry
run: |
if [ ${{ matrix.java-version }} -eq 8 ]; then
for i in {1..5}; do
dnf install -y java-1.8.0-openjdk-devel maven && break || sleep 15
done
elif [ ${{ matrix.java-version }} -eq 11 ]; then
for i in {1..5}; do
dnf install -y java-11-openjdk-devel maven && break || sleep 15
done
elif [ ${{ matrix.java-version }} -eq 21 ]; then
for i in {1..5}; do
dnf install -y java-21-openjdk-devel maven && break || sleep 15
dnf install -y maven && break || sleep 15
done
fi
- name: Verify Java and Maven installation
run: |
Expand Down

0 comments on commit 2567742

Please sign in to comment.