-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.44 KB
/
github-actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Stargazer CI
on: [push, pull_request]
jobs:
pipeline:
name: Stargazer Pipeline
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]')"
timeout-minutes: 40
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Setup Java 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Run unit and integration tests
run: |
chmod +x mvnw
./mvnw -ntp verify --batch-mode
- name: Analyze coverage with codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Deploy to Heroku
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
if [ ! -z "$HEROKU_API_KEY" ]; then
./mvnw -ntp heroku:deploy -DskipTests -Dheroku.appName=stargazer-gbloch
else
echo No HEROKU_API_KEY, skipping Deployement...
fi