test: 测试action.yml
This commit is contained in:
parent
5714558965
commit
b0a99cb4f7
29
.github/workflows/detection.yml
vendored
Normal file
29
.github/workflows/detection.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
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
|
||||
- uses: ./ # 使用当前仓库的根目录下的 action.yml
|
||||
with:
|
||||
code_path: "./src"
|
||||
vulnerabilities_file: "./data/vulnerabilities.txt"
|
||||
requirements_file: "./data/requirements.txt"
|
||||
output_format: "txt"
|
18
.github/workflows/python-test.yml
vendored
18
.github/workflows/python-test.yml
vendored
@ -1,18 +0,0 @@
|
||||
name: Python application test
|
||||
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user