Skip to content

#67 アーティファクトファイルが起動しないのを修正する #21

#67 アーティファクトファイルが起動しないのを修正する

#67 アーティファクトファイルが起動しないのを修正する #21

name: Run Java Tests on PR Merge Commit
on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 # 全ての履歴とブランチをフェッチ
- name: Set up merge commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git fetch origin ${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
git checkout -b pr-merge origin/${{ github.base_ref }}
git merge ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Run Maven tests
run: |
./mvnw test