Skip to content

Commit

Permalink
Applied updates and changes for CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Apr 1, 2024
1 parent 433ea30 commit c8bdd8d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 80 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['38']
version: ['39', '40']
container:
image: registry.fedoraproject.org/fedora:${{ matrix.version }}
steps:
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: |
dnf copr -y enable @gift/dev
dnf install -y @development-tools python3 python3-devel libbde-python3 libcaes-python3 libcreg-python3 libewf-python3 libfcrypto-python3 libfsapfs-python3 libfsext-python3 libfsfat-python3 libfshfs-python3 libfsntfs-python3 libfsxfs-python3 libfvde-python3 libfwnt-python3 libluksde-python3 libmodi-python3 libphdi-python3 libqcow-python3 libregf-python3 libsigscan-python3 libsmdev-python3 libsmraw-python3 libvhdi-python3 libvmdk-python3 libvsapm-python3 libvsgpt-python3 libvshadow-python3 libvslvm-python3 python3-artifacts python3-cffi python3-dfdatetime python3-dfimagetools python3-dfvfs python3-dfwinreg python3-dtfabric python3-idna python3-pytsk3 python3-pyyaml python3-setuptools python3-xattr
dnf install -y @development-tools libbde-python3 libcaes-python3 libcreg-python3 libewf-python3 libfcrypto-python3 libfsapfs-python3 libfsext-python3 libfsfat-python3 libfshfs-python3 libfsntfs-python3 libfsxfs-python3 libfvde-python3 libfwnt-python3 libluksde-python3 libmodi-python3 libphdi-python3 libqcow-python3 libregf-python3 libsigscan-python3 libsmdev-python3 libsmraw-python3 libvhdi-python3 libvmdk-python3 libvsapm-python3 libvsgpt-python3 libvshadow-python3 libvslvm-python3 python3 python3-artifacts python3-build python3-cffi python3-devel python3-dfdatetime python3-dfimagetools python3-dfvfs python3-dfwinreg python3-dtfabric python3-idna python3-pytsk3 python3-pyyaml python3-setuptools python3-wheel python3-xattr
- name: Run tests
env:
LANG: C.utf8
Expand All @@ -27,21 +27,17 @@ jobs:
- name: Run end-to-end tests
run: |
if test -f tests/end-to-end.py; then PYTHONPATH=. python3 ./tests/end-to-end.py --debug -c config/end-to-end.ini; fi
- name: Build source distribution
- name: Build source distribution (sdist)
run: |
python3 ./setup.py sdist
- name: Build binary distribution
python3 -m build --no-isolation --sdist
- name: Build binary distribution (wheel)
run: |
python3 ./setup.py bdist
- name: Run build and install test
run: |
python3 ./setup.py build
python3 ./setup.py install
python3 -m build --no-isolation --wheel
test_ubuntu:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['22.04']
version: ['24.04']
container:
image: ubuntu:${{ matrix.version }}
steps:
Expand All @@ -58,7 +54,7 @@ jobs:
run: |
add-apt-repository -y ppa:gift/dev
apt-get update -q
apt-get install -y build-essential python3 python3-dev libbde-python3 libcaes-python3 libcreg-python3 libewf-python3 libfcrypto-python3 libfsapfs-python3 libfsext-python3 libfsfat-python3 libfshfs-python3 libfsntfs-python3 libfsxfs-python3 libfvde-python3 libfwnt-python3 libluksde-python3 libmodi-python3 libphdi-python3 libqcow-python3 libregf-python3 libsigscan-python3 libsmdev-python3 libsmraw-python3 libvhdi-python3 libvmdk-python3 libvsapm-python3 libvsgpt-python3 libvshadow-python3 libvslvm-python3 python3-artifacts python3-cffi-backend python3-dfdatetime python3-dfimagetools python3-dfvfs python3-dfwinreg python3-distutils python3-dtfabric python3-idna python3-pip python3-pytsk3 python3-setuptools python3-wheel python3-xattr python3-yaml
apt-get install -y build-essential libbde-python3 libcaes-python3 libcreg-python3 libewf-python3 libfcrypto-python3 libfsapfs-python3 libfsext-python3 libfsfat-python3 libfshfs-python3 libfsntfs-python3 libfsxfs-python3 libfvde-python3 libfwnt-python3 libluksde-python3 libmodi-python3 libphdi-python3 libqcow-python3 libregf-python3 libsigscan-python3 libsmdev-python3 libsmraw-python3 libvhdi-python3 libvmdk-python3 libvsapm-python3 libvsgpt-python3 libvshadow-python3 libvslvm-python3 python3 python3-artifacts python3-build python3-cffi-backend python3-dev python3-dfdatetime python3-dfimagetools python3-dfvfs python3-dfwinreg python3-distutils python3-dtfabric python3-idna python3-pip python3-pytsk3 python3-setuptools python3-wheel python3-xattr python3-yaml
- name: Run tests
env:
LANG: en_US.UTF-8
Expand All @@ -69,16 +65,9 @@ jobs:
LANG: en_US.UTF-8
run: |
if test -f tests/end-to-end.py; then PYTHONPATH=. python3 ./tests/end-to-end.py --debug -c config/end-to-end.ini; fi
- name: Update setuptools
run: |
python3 -m pip install -U setuptools
- name: Build source distribution
run: |
python3 ./setup.py sdist
- name: Build binary distribution
- name: Build source distribution (sdist)
run: |
python3 ./setup.py bdist
- name: Run build and install test
python3 -m build --no-isolation --sdist
- name: Build binary distribution (wheel)
run: |
python3 ./setup.py build
python3 ./setup.py install
python3 -m build --no-isolation --wheel
2 changes: 1 addition & 1 deletion scripts/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def Main():
command_line.AddStorageMediaImageCLIArguments(argument_parser)

argument_parser.add_argument(
'source', nargs='?', action='store', metavar='image.raw', default=None,
'source', nargs='?', action='store', metavar='PATH', default=None,
help='path of a storage media image or SQLite database file.')

options = argument_parser.parse_args()
Expand Down
49 changes: 0 additions & 49 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,54 +38,5 @@ exclude =
utils
where = .

[bdist_rpm]
release = 1
packager = Joachim Metz <[email protected]>
doc_files =
ACKNOWLEDGEMENTS
AUTHORS
LICENSE
README
build_requires = python3-setuptools
requires =
libbde-python3 >= 20220121
libcaes-python3 >= 20240114
libcreg-python3 >= 20200725
libewf-python3 >= 20131210
libfcrypto-python3 >= 20240114
libfsapfs-python3 >= 20220709
libfsext-python3 >= 20220829
libfsfat-python3 >= 20220925
libfshfs-python3 >= 20220831
libfsntfs-python3 >= 20211229
libfsxfs-python3 >= 20220829
libfvde-python3 >= 20220121
libfwnt-python3 >= 20210717
libluksde-python3 >= 20220121
libmodi-python3 >= 20210405
libphdi-python3 >= 20220228
libqcow-python3 >= 20201213
libregf-python3 >= 20201002
libsigscan-python3 >= 20230109
libsmdev-python3 >= 20140529
libsmraw-python3 >= 20140612
libvhdi-python3 >= 20201014
libvmdk-python3 >= 20140421
libvsapm-python3 >= 20230506
libvsgpt-python3 >= 20211115
libvshadow-python3 >= 20160109
libvslvm-python3 >= 20160109
python3-artifacts >= 20220219
python3-cffi >= 1.9.1
python3-dfdatetime >= 20221112
python3-dfimagetools >= 20240107
python3-dfvfs >= 20240115
python3-dfwinreg >= 20211207
python3-dtfabric >= 20230518
python3-idna >= 2.5
python3-pytsk3 >= 20210419
python3-pyyaml >= 3.10
python3-xattr >= 0.7.2

[bdist_wheel]
universal = 1
2 changes: 1 addition & 1 deletion sqliterc/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DatabaseDefinition(object):
Attributes:
artifact_definition (str): name of the corresponding Digital Forensics
Artifact definition.
database_identifier (str): identifier of the database type.
database_identifier (str): identifier of the database.
"""

def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion sqliterc/yaml_definitions_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class YAMLDatabaseDefinitionsFile(object):
Where:
* artifact_definition, name of the corresponding Digital Forensics Artifact
definition.
* database_identifier, identifier of the database type.
* database_identifier, identifier of the database.
"""

_SUPPORTED_KEYS = frozenset([
Expand Down
8 changes: 4 additions & 4 deletions tests/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ class ColumnDefinitionTest(test_lib.BaseTestCase):

def testInitialize(self):
"""Tests the __init__ function."""
column_definition = resources.ColumnDefinition()
self.assertIsNotNone(column_definition)
test_definition = resources.ColumnDefinition()
self.assertIsNotNone(test_definition)


class DatabaseDefinitionTest(test_lib.BaseTestCase):
"""Tests for the database definition."""

def testInitialize(self):
"""Tests the __init__ function."""
database_definition = resources.DatabaseDefinition()
self.assertIsNotNone(database_definition)
test_definition = resources.DatabaseDefinition()
self.assertIsNotNone(test_definition)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ commands =
yamllint -v
docformatter --check --diff --recursive scripts setup.py sqliterc tests
pylint --rcfile=.pylintrc scripts setup.py sqliterc tests
yamllint -c .yamllint.yaml sqliterc/data test_data
yamllint -c .yamllint.yaml sqliterc test_data

0 comments on commit c8bdd8d

Please sign in to comment.