Skip to content

WoAh I nO lOnGeR cRaSh WhEn I dRoP aLl My CrAyOnS #7413

WoAh I nO lOnGeR cRaSh WhEn I dRoP aLl My CrAyOnS

WoAh I nO lOnGeR cRaSh WhEn I dRoP aLl My CrAyOnS #7413

---
name: Build and Scan
on:
push:
branches: [ main, master, dev, v*.* ]
pull_request:
branches: [ main, master, dev, v*.* ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup python
uses: actions/[email protected]
with:
python-version: 3.11.7
architecture: x64
- name: Install linters
run: pip install black pycodestyle pydocstyle djlint
- name: Run black
run: black . --check -l 200
- name: Run pycodestyle
run: pycodestyle --ignore E501,W605,W503,E203,E741,E731,E402 .
- name: Run pydocstyle
run: pydocstyle .
pytest:
runs-on: ubuntu-latest
name: Run Tests
steps:
- uses: actions/checkout@v5
- name: Setup python
uses: actions/[email protected]
with:
python-version: 3.11.7
architecture: x64
- name: Install packages
run: pip install -r requirements-dev.txt
- name: Run pytest
run: |
pytest --max-failure-rate 0.5 -n 4 -v --cov --cov-report xml:coverage.xml ${GITHUB_WORKSPACE}/tests || true
# cat the file error_status to see if there were any errors 1 if there was 0 if not
STATUS=$(cat error_status)
if [ "$STATUS" -eq 1 ]; then
exit 1
fi
- name: Get Cover
uses: orgoro/[email protected]
continue-on-error: true
with:
coverageFile: ./coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
- name: Job Complete
run: echo "Job Complete"
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript-typescript', 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
queries: security-extended,security-and-quality
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4