Skip to content

chore(deps): update babel monorepo #2057

chore(deps): update babel monorepo

chore(deps): update babel monorepo #2057

Workflow file for this run

name: Coverage
on:
push:
branches: [master]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18.x]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{matrix.node}}
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}
- run: npm -v
- run: npm ci
- name: Run jest coverage
run: |
set -o pipefail
npm run coverage | tee /tmp/test-output.log
- name: Check for missed warnings/errors
run: |
if grep -E "console.error|Error:|ERROR:|ERROR: 'Warning|Warning:|WARN:|WARN \[web-server\]" /tmp/test-output.log; then
echo "Test run output contains one or more warnings/errors. Please check and fix them."
exit 1
fi
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage/coverage-final.json
- name: Notify Slack channel
if: always() && job.status != 'success' && github.ref == 'refs/heads/master'
env:
GITHUB_WORKFLOW: ${{env.GITHUB_WORKFLOW}}
GITHUB_RUN_NUMBER: ${{env.GITHUB_RUN_NUMBER}}
GITHUB_SHA: ${{env.GITHUB_SHA}}
GITHUB_REPOSITORY: ${{env.GITHUB_REPOSITORY}}
GITHUB_REF: ${{env.GITHUB_REF}}
run: |
GIT_SHA_SHORT=$(git rev-parse --short ${GITHUB_SHA})
NOTIFICATION_TEXT="${GITHUB_WORKFLOW} [${{matrix.node}}] #${GITHUB_RUN_NUMBER} (${GIT_SHA_SHORT}) of ${GITHUB_REPOSITORY}@${GITHUB_REF}"
SUCCESS_NOTIFICATION="${NOTIFICATION_TEXT} successful"
SUCCESS_COLOR="good"
FAILURE_NOTIFICATION="${NOTIFICATION_TEXT} failed"
FAILURE_COLOR="danger"
CANCELLED_NOTIFICATION="${NOTIFICATION_TEXT} cancelled"
CANCELLED_COLOR="warning"
if [[ ${{job.status}} == "success" ]]; then
TEXT=$SUCCESS_NOTIFICATION
COLOR=$SUCCESS_COLOR
elif [[ ${{job.status}} == "failure" ]]; then
TEXT=$FAILURE_NOTIFICATION
COLOR=$FAILURE_COLOR
elif [[ ${{job.status}} == "cancelled" ]]; then
TEXT=$CANCELLED_NOTIFICATION
COLOR=$CANCELLED_COLOR
fi
curl -X POST \
-H "Content-Type: application/json" \
--url ${{secrets.SLACK_WEBHOOK}} \
-d @- << EOF
{
"attachments": [
{
"color": "${COLOR}",
"text": "${TEXT}"
}
]
}
EOF