-
Notifications
You must be signed in to change notification settings - Fork 4
100 lines (96 loc) · 2.91 KB
/
liveTest.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Testing
on:
workflow_dispatch:
push:
branches: [ "master" ]
paths:
- '**.py'
- '**.cpp'
- '**.toml'
pull_request:
branches: [ "master" ]
concurrency:
group: ci-tests-${{ github.ref }}
cancel-in-progress: true
jobs:
static: # Static code analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
# We will pretend that __CryptoLib does not need building.
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
if: github.event_name == 'pull_request'
with:
license-check: false
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "python"
config-file: ./.github/code-ql/codeql-config.yml
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Lint with pylint
run: |
pip install pylint
pylint krypton/
test: # run tests
permissions:
actions: read
contents: read
security-events: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: 'cpp'
config-file: ./.github/code-ql/codeql-config.yml
queries: security-and-quality
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
cache: 'pip'
- name: Pre-run Tasks
run: |
python -m pip install --upgrade pip setuptools wheel
./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg install --triplet x64-linux
- name: Install extension
run: |
pip install .[tests]
- name: Run Test
id: test
run: |
sudo chmod -R a+rwx ${{ github.workspace }}
pip install coverage
python -m coverage run --source krypton --branch -m unittest discover -s tests -p "*test*.py" --verbose
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Install AutoBuild depends
run: python -m pip install pybind11
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3