Skip to content

Add github workflows. #1

Add github workflows.

Add github workflows. #1

Workflow file for this run

name: Build torontobot
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.20
- name: Format
run: if [ "$(go fmt ./... | wc -l)" -gt 0 ]; then exit 1; fi
- name: Test
run: go test -v ./...
- name: Check prettier
run: npm run format
- name: Report Status to Slack
if: always()
uses: ravsamhq/notify-slack-action@master
with:
status: ${{ job.status }}
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_SHIPPER_WEBHOOK }}