-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub action to build and test upon push or PR (#2368)
* add build workflow * remove basex-tests and caching, add upload for possible dump files, upload upon failure only
- Loading branch information
1 parent
bdc691b
commit ea8c038
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build and Test BaseX | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Set up Java | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
|
||
# Build the project using Maven | ||
- name: Build with Maven | ||
run: mvn clean install | ||
|
||
# Archive test reports and possible dumps in case of failure | ||
- name: Upload test results | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-results | ||
path: | | ||
'**/target/surefire-reports/**/*.xml' | ||
'**/*.dump' | ||
'**/*.dumpstream' |