First tests #9
Workflow file for this run
This file contains hidden or 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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
unit-tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Unit tests | |
run: npm run test | |
notify-slack: | |
name: Notify on failure | |
needs: [ unit-tests ] | |
if: failure() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Map users | |
id: map-actor-to-slack | |
uses: icalia-actions/[email protected] | |
with: | |
actor-map: ${{ vars.SLACK_GITHUB_USERS_MAP }} | |
default-mapping: C067BD0377F | |
- name: Send notification | |
uses: ravsamhq/notify-slack-action@v2 | |
with: | |
status: 'failure' | |
notification_title: 'FlowFuse Tests Pipeline' | |
footer: "<{run_url}|View Run>" | |
mention_users: ${{ steps.map-actor-to-slack.outputs.actor-mapping }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.GH_WORKFLOWS_WEBHOOK }} | |