#67 アーティファクトファイルが起動しないのを修正する #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |