Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to Github actions (#448)
* chore: migrate to github actions
- Loading branch information
Bilal Boussayoud
committed
Dec 14, 2021
1 parent
662f388
commit e55a425
Showing
6 changed files
with
62 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Run Tests | ||
on: | ||
push: | ||
branches: [ '*' ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
# Run automatically at 8AM PST Monday-Friday | ||
- cron: '0 15 * * 1-5' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
name: Build & Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
go: [ '1.14', '1.15', '1.16' ] | ||
steps: | ||
- name: Checkout sendgrid-go | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Go environment | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Set Go env vars | ||
run: | | ||
echo "GOPATH=$HOME" >> $GITHUB_ENV | ||
echo "GOBIN=$HOME/bin" >> $GITHUB_ENV | ||
echo "GO111MODULE=off" >> $GITHUB_ENV | ||
- name: Run Tests | ||
run: make test-docker | ||
|
||
notify-on-failure: | ||
name: Slack notify on failure | ||
if: ${{ failure() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }} | ||
needs: [ tests ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_COLOR: 'failure' | ||
SLACK_ICON_EMOJI: ':github:' | ||
SLACK_MESSAGE: ${{ format('Failed running build on {1}{3} {0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id, ':') }} | ||
SLACK_TITLE: Build Failure | ||
SLACK_USERNAME: GitHub Actions | ||
SLACK_MSG_AUTHOR: twilio-dx | ||
SLACK_FOOTER: Posted automatically using GitHub Actions | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
MSG_MINIMAL: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters