diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ac2fc962..b3e2e1e1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,7 +2,6 @@ name: publish on: push: - branches: [ "main" ] tags: - '*' @@ -43,7 +42,7 @@ jobs: name: deploy image runs-on: ubuntu-latest steps: - - uses: appleboy/ssh-action@v1 + - uses: appleboy/ssh-action@v1.0.0 with: host: ${{ secrets.DEPLOY_HOST }} username: ${{ secrets.DEPLOY_USERNAME }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..b366ac85 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: test + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + env: + MVN: mvn --show-version --batch-mode + steps: + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - uses: actions/checkout@v4 + + - name: cache ~/.m2 + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: run compile + run: $MVN clean compile + + - name: run test + run: $MVN test -pl '!:interweb-server'