Merge pull request #76 from mbari-org/dependabot/npm_and_yarn/mxm-ui/… #23
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: MXM UI tests | |
on: | |
push: | |
paths: ['mxm-ui/**'] | |
pull_request: | |
paths: ['mxm-ui/**'] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./mxm-ui | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'yarn' | |
cache-dependency-path: | | |
mxm-ui/yarn.lock | |
- name: Install jest | |
run: yarn global add jest | |
- name: Check format, and test | |
run: (yarn && yarn run format-check && yarn run test:unit) | |
# - uses: act10ns/slack@v1 | |
# with: | |
# status: ${{ job.status }} | |
# fields: repo,message,commit,ref,workflow | |
# # fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) | |
# env: | |
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required | |
# if: always() # Pick up events even if the job fails or is canceled. |