Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

dashboard add nsq support #22

dashboard add nsq support

dashboard add nsq support #22

Workflow file for this run

name: Unit Tests
on:
pull_request:
branches:
- "main"
push:
branches:
- "main"
jobs:
backend-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
frontend:
- 'frontend/**'
backend:
- '**/*.go'
- name: Set up Go
if: steps.changes.outputs.backend == 'true'
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Test Backend
if: steps.changes.outputs.backend == 'true'
run: |
go vet ./...
go test -v ./...
- name: Set up Node.js
if: steps.changes.outputs.frontend == 'true'
uses: actions/setup-node@v3
with:
node-version: 17
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Test Frontend
if: steps.changes.outputs.frontend == 'true'
run: |
cd frontend
npm install
npm run lint
- name: Notify of test failure
if: failure()
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'github-actions'
slack-message: "Dashboard tests: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}