Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 11 additions & 75 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,87 +1,23 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
name: Pytest

permissions:
contents: write # needed for gh release upload
on: [push]

jobs:
build:
name: Build and Test Package
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.14"]
os: [ubuntu-latest]

python-version: ["3.13", "3.14"]
steps:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Cache Python Dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install Build Tools
- name: Install dependencies
run: |
python -m pip install --upgrade pip build
python -m pip install pybind11

- name: Lint Code
uses: wearerequired/lint-action@v2.3.0
with:
linters: |
pylint

- name: Build Wheel
run: |
python -m build --wheel
ls -al dist

- name: Upload Built Wheels (artifact)
uses: actions/upload-artifact@v4
with:
name: binaryparser-wheels
path: dist/*.whl
if-no-files-found: error

- name: Ensure release exists
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view v1.2.0 >/dev/null 2>&1 || gh release create v1.2.0 -t "v1.2.0" -n ""

- name: Upload Release Asset(s)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ls -al dist
gh release upload v1.2.0 dist/*cp314*.whl --clobber

- name: Install Built Package
run: pip install dist/*.whl

- name: Run Tests
# Remove PYTHONPATH so tests import the installed wheel, not files from the repo root
run: |
python -m pip install pytest
pytest tests/

- name: Show Python Environment (Debug)
if: failure()
pip install --upgrade pip
pip install .[dev]
- name: Test the code with pytest
run: |
python --version
pip list
ls -R
pytest .
24 changes: 24 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pylint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.14"]
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[dev]
pip install pylint
- name: Analysing the code with pylint
run: |
pylint binary_parser
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.idea/
bin/TestDaten
.development
tests/__pycache__
/BinaryPaser.egg-info/
/build/
10 changes: 10 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/BinaryParser.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading