mattermost-mobile-upstream/.github/actions/test/action.yaml

44 lines
980 B
YAML

name: test
description: Common tests for mobile repo
runs:
using: composite
steps:
- name: ci/prepare-node-deps
uses: ./.github/actions/prepare-node-deps
- name: ci/check-styles
shell: bash
run: |
echo "::group::check-styles"
npm run lint &
LINT_PID=$!
npm run tsc &
TSC_PID=$!
set +e
wait "$LINT_PID"
LINT_EXIT=$?
wait "$TSC_PID"
TSC_EXIT=$?
set -e
if [ $LINT_EXIT -ne 0 ] || [ $TSC_EXIT -ne 0 ]; then
exit 1
fi
echo "::endgroup::"
- name: ci/run-tests
# main and PR will run test:coverage
if: startsWith(github.ref_name, 'release-')
shell: bash
run: |
echo "::group::run-tests"
npm run test:ci
echo "::endgroup::"
- name: ci/check-i18n
shell: bash
run: |
echo "::group::check-i18n"
./scripts/precommit/i18n.sh
echo "::endgroup::"