mirror of
https://github.com/revanced/revanced-static-api.git
synced 2025-04-29 22:24:37 +02:00
ci: add type, linting and security checks
This commit is contained in:
parent
00d7cc0cfa
commit
74bb1010da
16
.github/workflows/black.yml
vendored
Normal file
16
.github/workflows/black.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
name: Black formatter
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "dev" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: psf/black@stable
|
||||
with:
|
||||
options: "--check --verbose"
|
||||
src: "./src"
|
55
.github/workflows/codeql.yml
vendored
Normal file
55
.github/workflows/codeql.yml
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "dev" ]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
default_branch: dev
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'python' ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.default_branch }}
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11.3'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ];
|
||||
then pip install -r requirements.txt;
|
||||
fi
|
||||
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
setup-python-dependencies: false
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
26
.github/workflows/mypy.yml
vendored
Normal file
26
.github/workflows/mypy.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: MyPy
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "dev" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mypy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11.3
|
||||
architecture: x64
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install mypy
|
||||
run: pip install mypy
|
||||
- name: Run mypy
|
||||
uses: sasanquaneuf/mypy-github-action@main
|
||||
with:
|
||||
checkName: 'mypy'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
Loading…
x
Reference in New Issue
Block a user