Some checks are pending
Vulnerability and Backdoor Detection Workflow / security_check (pull_request) Blocked by required conditions
Vulnerability and Backdoor Detection Workflow / build (pull_request) Successful in 15s
33 lines
929 B
YAML
33 lines
929 B
YAML
name: Vulnerability and Backdoor Detection Workflow
|
||
|
||
on:
|
||
push:
|
||
branches: [main]
|
||
pull_request:
|
||
branches: [main]
|
||
|
||
jobs:
|
||
build:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v2
|
||
- name: Install dependencies
|
||
run: pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||
- name: Run tests
|
||
run: python -m unittest discover -s tests
|
||
|
||
security_check:
|
||
runs-on: ubuntu-latest
|
||
needs: build # 确保安全检查在构建后执行
|
||
steps:
|
||
- uses: actions/checkout@v2
|
||
- name: Set up Python
|
||
uses: actions/setup-python@v2
|
||
with:
|
||
python-version: "3.9" # 或选择一个适合你项目的具体版本,比如3.8, 3.7等
|
||
- uses: ./ # 使用当前仓库的根目录下的 action.yml
|
||
with:
|
||
code_path: "./tests"
|
||
requirements_file: "./requirements.txt"
|
||
output_format: "txt"
|