[Snyk] Security upgrade djangorestframework from 3.11.2 to 3.15.2 #187
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: Django CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
SECRET_KEY: test-secret | |
DATABASE_URL: mysql://root:[email protected]:3306/epub_core?init_command=SET sql_mode='STRICT_TRANS_TABLES'&charset=utf8mb4 | |
CACHE_URL: locmemcache:// | |
DB_DATABASE: epub_core | |
DB_USER: root | |
DB_PASSWORD: root | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.7] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up MySQL | |
run: | | |
sudo /etc/init.d/mysql start | |
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements/dev.txt | |
- name: Run Tests | |
run: | | |
coverage run --source='./' manage.py test --settings=epub_python_core.settings | |
coverage xml | |
- name: "Upload coverage to Codecov" | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
fail_ci_if_error: true | |
- 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 }} |