-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: migrate to GitHub Actions #88
Changes from 7 commits
b419457
340662e
d64c182
2eb1b08
ec7c8db
2e037f9
3d1aae2
c7618b7
ce2e782
ca78609
a3ddb04
a91f4d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
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.11.x', '1.12.x', '1.13.x', '1.14.x', '1.15.x', '1.16.x' ] | ||
steps: | ||
- name: Checkout smtpapi-go | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Go environment | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Set GOPATH | ||
run: echo "GOPATH=$HOME" >> $GITHUB_ENV | ||
- name: Set GOBIN | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In sg-go, not setting |
||
run: echo "GOBIN=$GOPATH/bin" >> $GITHUB_ENV | ||
- name: Set GO111MODULE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should, but not explicitly disabling |
||
run: echo "GO111MODULE=off" >> $GITHUB_ENV | ||
childish-sambino marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Build smtpapi-go | ||
run: make install | ||
childish-sambino marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Run Tests | ||
run: make test | ||
|
||
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: 'danger' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switch to |
||
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 | ||
childish-sambino marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove the
.x
esgo: ['1.11', '1.12'..]