chore(deps): update all non-major dependencies #730
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |