mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-09-16 03:39:05 +02:00
Update GitHub Actions workflows for PRs and tests
Enables all pull request event types in build-on-pull-request.yml and cleans up formatting. Removes redundant step for copying workflow file in run-tests.yml to streamline the workflow.
This commit is contained in:
parent
97f457575d
commit
6078db6157
13
.github/workflows/build-on-pull-request.yml
vendored
13
.github/workflows/build-on-pull-request.yml
vendored
@ -2,11 +2,12 @@ name: Run Tests
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
# types: [opened, reopened, synchronize, edited]
|
types: [opened, reopened, synchronize, edited]
|
||||||
branches: [ "main" ]
|
branches:
|
||||||
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'src/**' # Run if changes occur in the 'src' folder
|
- 'src/**'
|
||||||
- 'pom.xml' # Run if changes occur in the 'pom.xml' file
|
- 'pom.xml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
@ -26,8 +27,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
distribution: 'adopt-hotspot'
|
distribution: 'adopt-hotspot'
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
server-id: github
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
settings-path: ${{ github.workspace }}
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: mvn --file pom.xml -U clean package
|
run: mvn --file pom.xml -U clean package
|
||||||
|
11
.github/workflows/run-tests.yml
vendored
11
.github/workflows/run-tests.yml
vendored
@ -21,17 +21,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.branch }}
|
ref: ${{ github.event.inputs.branch }}
|
||||||
|
|
||||||
- name: Use workflow from checked out branch
|
|
||||||
run: |
|
|
||||||
if [ -f .github/workflows/run-tests.yml ]; then
|
|
||||||
echo "Using workflow from checked out branch."
|
|
||||||
cp .github/workflows/run-tests.yml /tmp/run-tests.yml
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "Workflow file not found in checked out branch."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up Ollama
|
- name: Set up Ollama
|
||||||
run: |
|
run: |
|
||||||
curl -fsSL https://ollama.com/install.sh | sh
|
curl -fsSL https://ollama.com/install.sh | sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user