forked from Gnome15/gnome15
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (76 loc) · 2.17 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
on: push
jobs:
fossa:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
- name: Print Python version
run: python -V
- name: Checkout
uses: actions/checkout@v2
- name: Load pip cache
uses: actions/cache@v2
with:
path: .pip
key: pip-${{ runner.os }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
pip-${{ runner.os }}-
pip-
- name: Install requirements
run: |
pip --cache-dir=.pip install --upgrade pip
pip --cache-dir=.pip install -r requirements.txt
- name: Install FOSSA
run: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
- name: Run FOSSA
run: fossa analyze
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
lint:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
- name: Print Python version
run: python -V
- name: Checkout
uses: actions/checkout@v2
- name: Load pip cache
uses: actions/cache@v2
with:
path: .pip
key: pip-${{ runner.os }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
pip-${{ runner.os }}-
pip-
- name: Install requirements
run: |
pip --cache-dir=.pip install --upgrade pip
pip --cache-dir=.pip install pylint
pip --cache-dir=.pip install -r requirements.txt
- name: Run Pylint
run: pylint src mksvgheaders.py 2>&1 | tee pylint.txt
working-directory: ${{ github.workspace }}
- name: Upload results
uses: actions/upload-artifact@v2
with:
name: Lint
path: |
${{ github.workspace }}/pylint.txt
if-no-files-found: error
sast:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: AppThreat/sast-scan-action@master
with:
type: bash,python
- uses: actions/upload-artifact@v2
with:
name: reports
path: reports
if-no-files-found: error