Skip to content

Commit 9c961a3

Browse files
authored
Update testing.yml (#49)
* Update testing.yml and tox.ini * Update .pre-commit-config.yaml * add auto asyncio mode for tests * remove unneeded line
1 parent fdb0bab commit 9c961a3

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

.github/workflows/testing.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,19 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
include:
12-
- python-version: 3.8
13-
toxenv: py38,style,coverage-ci
14-
- python-version: 3.9
15-
toxenv: py39,style,coverage-ci
1612
- python-version: 3.10.9
1713
toxenv: py310,style,coverage-ci
1814
- python-version: 3.11
1915
toxenv: py311,style,coverage-ci
16+
- python-version: 3.12
17+
toxenv: py312,style,coverage-ci
2018

2119
steps:
22-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v5
2321
with:
2422
submodules: recursive
2523
- name: Setup python
26-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
2725
with:
2826
python-version: ${{ matrix.python-version }}
2927
- name: Install dependencies

.pre-commit-config.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
repos:
2-
- repo: https://github.com/pycqa/flake8
3-
rev: 5.0.4
2+
- repo: https://github.com/PyCQA/flake8
3+
rev: 7.0.0
44
hooks:
55
- id: flake8
66
additional_dependencies: [flake8-bugbear]
77
- repo: https://github.com/PyCQA/bandit
8-
rev: 1.7.4
8+
rev: 1.7.7
99
hooks:
1010
- id: bandit
1111
entry: bandit -ll --exclude=tests/ --skip=B303
12-
additional_dependencies:
13-
- importlib-metadata<5; python_version < '3.8'

tox.ini

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[tox]
77
skipsdist = True
88
envlist =
9-
py{38,39,310,311}
9+
py{39,310,311,312}
1010
style
1111
coverage
1212
bandit
@@ -16,20 +16,22 @@ skip_missing_interpreters = true
1616
description = run tests
1717
passenv = TOXENV,CI,TRAVIS,TRAVIS_*,CODECOV_*
1818
deps =
19+
-rrequirements.txt
1920
virtualenv!=20.0.22
2021
pre-commit
2122
pytest
23+
pytest-asyncio==0.26.0
2224
pytest-aiohttp
2325
coverage
2426
codecov
2527
changedir = /tmp/caldera
2628
commands =
2729
/usr/bin/git clone https://github.com/mitre/caldera.git --recursive /tmp/caldera
2830
/bin/rm -rf /tmp/caldera/plugins/emu
29-
python -m pip install -r /tmp/caldera/requirements.txt
31+
python3 -m pip install -r /tmp/caldera/requirements.txt
32+
python3 -m pip install -r /tmp/caldera/requirements-dev.txt
3033
/usr/bin/cp -R {toxinidir} /tmp/caldera/plugins/emu
31-
python -m pip install -r /tmp/caldera/plugins/emu/requirements.txt
32-
coverage run -p -m pytest --tb=short --rootdir=/tmp/caldera /tmp/caldera/plugins/emu/tests -W ignore::DeprecationWarning
34+
coverage run -p -m pytest --tb=short --rootdir=/tmp/caldera --asyncio-mode=auto /tmp/caldera/plugins/emu/tests -W ignore::DeprecationWarning
3335
allowlist_externals =
3436
/usr/bin/git
3537
/usr/bin/cp

0 commit comments

Comments
 (0)