Skip to content

Commit

Permalink
chore: add ci workflow for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
astappiev committed Sep 20, 2023
1 parent 1a54aa3 commit 8834899
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: publish

on:
push:
branches: [ "main" ]
tags:
- '*'

Expand Down Expand Up @@ -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 }}
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 8834899

Please sign in to comment.