Fix SonarQube warning about missing reference for analysis (#796)
This commit is contained in:
parent
08d650ab42
commit
02cae0ceb0
@ -11,6 +11,8 @@ env:
|
||||
CIRRUS_CLONE_DEPTH: 0
|
||||
# Use bash (instead of sh on linux or cmd.exe on windows)
|
||||
CIRRUS_SHELL: bash
|
||||
BASE_BRANCH: ${CIRRUS_BASE_BRANCH}
|
||||
DEFAULT_BRANCH: ${CIRRUS_DEFAULT_BRANCH}
|
||||
|
||||
|
||||
container_definition: &CONTAINER_DEFINITION
|
||||
@ -40,6 +42,7 @@ tooling_tests_task:
|
||||
- pipenv install
|
||||
- pipenv run pip install pytest pytest-cov
|
||||
tests_script:
|
||||
- bash ci/fetch_branches.sh
|
||||
- cd rspec-tools
|
||||
- pipenv run pytest --cov=rspec_tools --cov-report=xml
|
||||
<<: *SETUP_SONAR_SCANNER
|
||||
@ -65,6 +68,7 @@ frontend_tests_task:
|
||||
- cd frontend
|
||||
- npm install
|
||||
tests_script:
|
||||
- bash ci/fetch_branches.sh
|
||||
- cd frontend
|
||||
- npm run build
|
||||
- npm test -- --detectOpenHandles --coverage .
|
||||
|
7
ci/fetch_branches.sh
Normal file
7
ci/fetch_branches.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# When neither BASE_BRANCH nor DEFAULT_BRANCH are defined, fall back to "master".
|
||||
BRANCH="${BASE_BRANCH:-${DEFAULT_BRANCH:-master}}"
|
||||
git fetch --force origin "refs/heads/${BRANCH}:refs/remotes/origin/${BRANCH}"
|
Loading…
x
Reference in New Issue
Block a user