perfin/.github/workflows/run-tests.yaml

50 lines
1.3 KiB
YAML
Raw Normal View History

2024-01-02 01:08:26 +00:00
name: Run Tests
on:
push:
branches:
2024-01-02 01:22:05 +00:00
- "*"
2024-01-02 02:11:54 +00:00
tags:
- "v*"
2024-01-02 01:08:26 +00:00
jobs:
maven-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
2024-01-02 01:27:49 +00:00
uses: actions/checkout@v4
2024-01-02 01:08:26 +00:00
- name: Setup JDK 21
2024-01-02 01:27:49 +00:00
uses: actions/setup-java@v4
2024-01-02 01:08:26 +00:00
with:
java-version: 21
distribution: temurin
cache: maven
- name: Install Maven 3.9.6
run: |
wget https://downloads.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
tar -xvf apache-maven-3.9.6-bin.tar.gz
sudo mv apache-maven-3.9.6 /usr/local/apache-maven
rm apache-maven-3.9.6-bin.tar.gz
sudo update-alternatives --install /usr/bin/mvn mvn /usr/local/apache-maven/bin/mvn 1
- name: Check versions
run: |
java -version
javac -version
mvn -version
2024-01-02 01:31:50 +00:00
2024-01-02 01:08:26 +00:00
- name: Test with Maven
run: mvn -B verify --file pom.xml
2024-01-02 01:51:37 +00:00
2024-01-02 02:09:37 +00:00
- name: Build Package for Release
2024-01-02 02:17:11 +00:00
if: ${{ startsWith(github.ref, 'refs/tags/') }}
2024-01-02 02:09:37 +00:00
run: ./scripts/package-linux-deb.sh
- name: Create Release
2024-01-02 02:17:11 +00:00
if: ${{ startsWith(github.ref, 'refs/tags/') }}
2024-01-02 02:09:37 +00:00
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
*.deb