feat(messaging): Add an endpoint to handle events (#185) #253
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
name: Chatbot - Pull Request checks | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- main | |
paths: | |
- chatbot/** | |
- .github/workflows/chatbot-pull-request.yml | |
push: | |
branches: | |
- main | |
paths: | |
- chatbot/** | |
- .github/workflows/chatbot-pull-request.yml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: chatbot | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.12 | |
cache: "npm" | |
cache-dependency-path: "**/package-lock.json" | |
- name: Install dependencies | |
run: npm ci | |
- name: build package | |
run: npm run build | |
lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: chatbot | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.12 | |
cache: "npm" | |
cache-dependency-path: "**/package-lock.json" | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linter | |
run: npm run lint | |
docker-build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: chatbot | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker build | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./chatbot | |
push: false | |
tags: chatbot:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
sonarcloud: | |
runs-on: ubuntu-latest | |
needs: [lint] | |
defaults: | |
run: | |
working-directory: chatbot | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
- uses: sonarsource/sonarcloud-github-action@master | |
name: SonarCloud Scan | |
with: | |
projectBaseDir: chatbot | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_MESSAGING }} |