Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/update_dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Update dependencies
on:
schedule:
# Run automatically at 6AM PST Tuesday
- cron: '0 6 * * 2'
workflow_dispatch:

jobs:
update_dependencies:
name: Update Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout java-http-client
uses: actions/checkout@v2

- name: Updating semver dependencies
run: make update-deps

- name: Add & Commit
uses: EndBug/[email protected]
with:
add: 'pom.xml'
default_author: 'github_actions'
message: 'Chore: update sendgrid-java dependencies'

test:
name: Test
if: success()
needs: [ update_dependencies ]
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
java: [ 8, 11, 17 ]

steps:
- name: Checkout java-http-client
uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'

- run: mvn install -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V
- name: Run Unit Tests
run: mvn test -B

notify-on-failure:
name: Slack notify on failure
if: failure()
needs: [ update_dependencies, test ]
runs-on: ubuntu-latest
steps:
- uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: failure
SLACK_ICON_EMOJI: ':github:'
SLACK_MESSAGE: ${{ format('Update dependencies *{0}*, Test *{1}*, {2}/{3}/actions/runs/{4}', needs.update_dependencies.result, needs.tests.result, github.server_url, github.repository, github.run_id) }}
SLACK_TITLE: Action Failure - ${{ github.repository }}
SLACK_USERNAME: GitHub Actions
SLACK_MSG_AUTHOR: twilio-dx
SLACK_FOOTER: Posted automatically using GitHub Actions
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: true
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: install package test test-integration clean
.PHONY: install package test update-deps test-integration clean

VERSION := $(shell mvn help:evaluate -Dexpression=project.version --batch-mode | grep -e '^[^\[]')
install:
Expand All @@ -13,5 +13,8 @@ package:
test:
mvn test

update-deps:
mvn versions:use-latest-releases versions:commit -DallowMajorUpdates=false

clean:
mvn clean