Skip to content

Commit

Permalink
chore: migrate from travis over to gh actions (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
shwetha-manvinkurke authored Oct 27, 2021
1 parent c920610 commit 6c49e98
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 17 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 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: Tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout twilio-oai
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Run spectral linting
run: make spectral

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: ${{ job.status }}
SLACK_ICON_EMOJI: ':github:'
SLACK_MESSAGE: ${{ format('Build {2} in {1} failed{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
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@twilio/twilio-oai",
"devDependencies": {
"@stoplight/spectral": "^5.8.0"
"@stoplight/spectral-cli": "^6.1.0"
}
}
2 changes: 1 addition & 1 deletion spectral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rules:
pascal-case-name-rule:
severity: error
recommended: true
message: OperationId should be pascalCased.
message: OperationId should be PascalCased.
type: style
given: "$.paths.[*].operationId"
then:
Expand Down

0 comments on commit 6c49e98

Please sign in to comment.