Skip to content

[Snyk] Fix for 1 vulnerabilities #351

[Snyk] Fix for 1 vulnerabilities

[Snyk] Fix for 1 vulnerabilities #351

Workflow file for this run

name: CI - Backend Application
on:
push:
branches: [main]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10.5
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
sudo apt install -y libswscale-dev ffmpeg libavformat-dev libavcodec-dev libfreetype6-dev libsdl-image1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev
python -m pip install --upgrade pip
cd $GITHUB_WORKSPACE/Backend/Services/Core.API/API/src
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 -m pip install --upgrade pytube ffmpeg setuptools pygame
python -m pip install flake8 pytest
- name: Lint with flake8
env: # Added those env vars
SDL_VIDEODRIVER: "dummy"
SDL_AUDIODRIVER: "disk"
run: |
cd $GITHUB_WORKSPACE/Backend/Services/Core.API/API/src
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Run our unit tests using the test application
- name: Run unit and integration tests
run: |
export CREATE_BINAURAL=False
cd $GITHUB_WORKSPACE/Backend/Services/Core.API/API/src
echo '{ "AWSAccessKeyId": "${{ secrets.AWSACCESSKEYID }}", "AWSSecretKey": "${{ secrets.AWSSECRETKEY }}" }' > .env.json
mkdir sounds
mkdir reports
python3 -m pytest