Skip to content

Commit ce65081

Browse files
authored
ci: split CI into separate files (#1552)
* ci: split CI into separate files * trying to break old CI * Fix long tests * finally delete old file * ci: specify Python version for conda
1 parent 7dd0d75 commit ce65081

File tree

4 files changed

+291
-294
lines changed

4 files changed

+291
-294
lines changed

.github/workflows/cve_scan.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CVE scan
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
cve_scan:
10+
name: CVE scan on dependencies
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 10
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v2
16+
with:
17+
cache: 'pip'
18+
cache-dependency-path: '**/requirements.txt'
19+
- name: Get date
20+
id: get-date
21+
run: |
22+
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
23+
- name: Get cached database
24+
uses: actions/cache@v2
25+
with:
26+
path: ~/.cache/cve-bin-tool
27+
key: ${{ runner.os }}-cve-bin-tool-${{ steps.get-date.outputs.date }}
28+
- name: Install dependencies and cve-bin-tool
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install --upgrade setuptools
32+
python -m pip install --upgrade wheel
33+
pip install . -r doc/requirements.txt
34+
- name: Test to check for CVEs for Python requirements and HTML report dependencies
35+
run: |
36+
pytest test/test_requirements.py

.github/workflows/linting.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
linting:
10+
name: Linting
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
tool: ['isort', 'black', 'pyupgrade', 'flake8', 'format_checkers', 'bandit']
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-python@v2
19+
with:
20+
cache: 'pip'
21+
- name: Install pre-commit
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install --upgrade setuptools
25+
python -m pip install --upgrade pre-commit
26+
pre-commit install
27+
- name: Install cve-bin-tool if needed
28+
if: ${{ matrix.tool == 'format_checkers' }}
29+
run: |
30+
python -m pip install --upgrade wheel
31+
python -m pip install .
32+
- name: Run ${{ matrix.tool }}
33+
run: |
34+
pre-commit run ${{ matrix.tool }} --all-files

.github/workflows/pythonapp.yml

Lines changed: 0 additions & 294 deletions
This file was deleted.

0 commit comments

Comments
 (0)