Fix/unit tests #69
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: sonarcloud | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
sonarcloud: | |
name: SonarCloud | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.4 | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Debugging | |
run: echo "MONGO_DB_TEST=$MONGO_DB_TEST" | |
- name: Config environment variables | |
env: | |
MONGO_DB_TEST: ${{ secrets.MONGO_DB_TEST }} | |
run: | | |
echo "MONGO_DB_TEST=$MONGO_DB_TEST" >> $GITHUB_ENV | |
- name: Run tests | |
run: python main_tests.py | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |