-
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (78 loc) · 2.21 KB
/
ci.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
77
78
79
80
81
82
---
# .github/workflows/ci.yml
name: CI
on:
push:
branches:
- main
permissions:
contents: read
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install poetry
poetry lock
poetry install
- name: Format check with Black
run: |
source venv/bin/activate
black --check scripts/
continue-on-error: true
- name: Lint with Pylint
run: |
source venv/bin/activate
pylint $(git ls-files '*.py')
continue-on-error: true
- name: Run tests
run: |
source venv/bin/activate
pytest --cov=app --cov-report=xml:coverage.xml || [$? -eq 5]
continue-on-error: true
- name: List files to verify coverage.xml
run: |
ls -la *.xml
cat *.xml
continue-on-error: true
- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: unittests
name: codecov-umbrella
continue-on-error: true
- name: OSSF Scorecard action
uses: ossf/[email protected]
with:
results_file: scoreboard-results.json
results_format: json
#publish_results: true
continue-on-error: true
- name: List files to verify scoreboard-results.json
run: |
ls -la scoreboard-results.json
cat scoreboard-results.json
continue-on-error: true
- name: Upload Scorecard Results to Security Scorecards API
if: always()
run: |
curl -X POST \
"" \
-H "Authorization: Bearer ${{ secrets.SCORECARD_TOKEN }}" \
-H "Content-Type: application/json" \
-d @scoreboard-results.json
continue-on-error: true