Files
TakahashiNguyen 88244cb56f
Release package / release (push) Successful in 30m1s
fix: add payment features (#52)
Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com>
Reviewed-on: #52
2026-05-12 05:22:08 +00:00

93 lines
2.7 KiB
YAML

name: Java CI with Maven
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
actions: read
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install dependencies with Proxy
env:
http_proxy: "http://host.docker.internal:3142"
https_proxy: "http://host.docker.internal:3142"
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 dependencies with Proxy
env:
http_proxy: "http://host.docker.internal:3142"
https_proxy: "http://host.docker.internal:3142"
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
- uses: shogo82148/actions-setup-redis@v1
with:
redis-version: "7.x"
- 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: Run Tests
env:
TESTCONTAINERS_RYUK_DISABLED: true
run: |
mvn clean test -Dquarkus.main.run-tests=true
- name: Publish Test Report
uses: dorny/test-reporter@v3
if: always()
with:
name: "JUnit Tests Report"
path: "**/target/surefire-reports/*.xml"
reporter: java-junit
fail-on-error: true