forked from RedisInsight/RedisInsight
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.97 KB
/
tests-frontend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Tests UI
on:
workflow_call:
env:
SLACK_AUDIT_REPORT_KEY: ${{ secrets.SLACK_AUDIT_REPORT_KEY }}
jobs:
unit-tests:
runs-on: ubuntu-latest
name: Unit tests Frontend job
steps:
- uses: actions/[email protected]
- name: Install all libs and dependencies
uses: ./.github/actions/install-all-build-libs
with:
skip-backend-deps: '1'
- name: UI PROD dependencies audit
run: |
FILENAME=ui.prod.deps.audit.json
yarn audit --groups dependencies --json > $FILENAME || true &&
FILENAME=$FILENAME DEPS="UI prod" node .circleci/deps-audit-report.js &&
curl -H "Content-type: application/json" --data @slack.$FILENAME -H "Authorization: Bearer $SLACK_AUDIT_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage
- name: UI DEV dependencies audit
run: |
FILENAME=ui.dev.deps.audit.json
yarn audit --groups devDependencies --json > $FILENAME || true &&
FILENAME=$FILENAME DEPS="UI dev" node .circleci/deps-audit-report.js &&
curl -H "Content-type: application/json" --data @slack.$FILENAME -H "Authorization: Bearer $SLACK_AUDIT_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage
- name: Code analysis
run: |
FILENAME=ui.lint.audit.json
WORKDIR="."
yarn lint:ui -f json -o $FILENAME || true &&
FILENAME=$FILENAME WORKDIR=$WORKDIR TARGET="UI" node .circleci/lint-report.js &&
curl -H "Content-type: application/json" --data @$WORKDIR/slack.$FILENAME -H "Authorization: Bearer $SLACK_AUDIT_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage
yarn lint -f json -o $FILENAME || true &&
FILENAME=$FILENAME WORKDIR=$WORKDIR TARGET="REST" node .circleci/lint-report.js &&
curl -H "Content-type: application/json" --data @$WORKDIR/slack.$FILENAME -H "Authorization: Bearer $SLACK_AUDIT_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage
- name: Unit tests UI
run: yarn test:cov --ci --silent