Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com> Reviewed-on: #51
This commit was merged in pull request #51.
This commit is contained in:
+33
-14
@@ -15,18 +15,40 @@ permissions:
|
||||
checks: write
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies with Proxy
|
||||
env:
|
||||
http_proxy: "http://host.docker.internal:3142"
|
||||
https_proxy: "http://host.docker.internal:3142"
|
||||
- name: Install JDK and Maven
|
||||
run: |
|
||||
# Kiểm tra proxy có hoạt động không
|
||||
echo "Acquire::http::Proxy \"$http_proxy\";" > /etc/apt/apt.conf.d/80proxy
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
openjdk-25-jdk-headless docker-cli docker-buildx zstd maven
|
||||
|
||||
- name: Cache Maven packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
**/target/native-image-cache
|
||||
**/target/reports
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-maven-
|
||||
|
||||
- name: Build native with Maven
|
||||
run: |
|
||||
mvn -B clean install -DskipTests -Pnative \
|
||||
-Dquarkus.container-image.push=false
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install JDK and Maven
|
||||
run: |
|
||||
# Kiểm tra proxy có hoạt động không
|
||||
echo "Acquire::http::Proxy \"$http_proxy\";" > /etc/apt/apt.conf.d/80proxy
|
||||
@@ -46,16 +68,13 @@ jobs:
|
||||
**/target/native-image-cache
|
||||
**/target/reports
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
restore-keys: ${{ runner.os }}-maven-
|
||||
|
||||
- name: Build and Test all module
|
||||
- name: Run Tests
|
||||
env:
|
||||
TESTCONTAINERS_RYUK_DISABLED: true
|
||||
run: |
|
||||
mvn -B clean install -Pnative \
|
||||
-Dquarkus.container-image.push=false \
|
||||
-Dquarkus.container-image.registry=git.demonkernel.io.vn
|
||||
mvn clean test -Dquarkus.main.run-tests=true
|
||||
|
||||
- name: Publish Test Report
|
||||
uses: dorny/test-reporter@v3
|
||||
|
||||
Reference in New Issue
Block a user