Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shpaker authored and A.Shpak committed Nov 22, 2024
1 parent 2531a0e commit 3cf2878
Show file tree
Hide file tree
Showing 7 changed files with 1,919 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
on:
push:
branches: [ main ]

jobs:
doc:
runs-on: windows-latest
steps:
- uses: extractions/setup-just@v2
- uses: actions/setup-python@v5
with:
python-version: 3.10
- uses: actions/checkout@v4
- run: |
python -m pip install poetry~=1.8.4
poetry install --no-ansi --sync
- run: just doc
- uses: actions/upload-artifact@v4
if: always()
with:
name: robot_doc
path: index.html
2 changes: 2 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
name: Build

on:
release:
types: [created]
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml → .github/workflows/robot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
---
name: Lint
name: Robot

on:
pull_request:
branches: [ main ]

jobs:
lint:
tests:
runs-on: windows-latest
strategy:
matrix:
PYTHON_VERSION:
# - "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand All @@ -26,10 +25,10 @@ jobs:
- uses: actions/checkout@v4
- run: |
python -m pip install poetry~=1.8.4
poetry install --no-ansi
poetry install --no-ansi --sync
- run: just tests
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.PYTHON_VERSION }}_robot_log
name: py${{ matrix.PYTHON_VERSION }}_robot_log
path: log.html
3 changes: 3 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ fix:

tests:
poetry run robot {{ TESTS_FILE }}

doc:
poetry run libdoc winregistry.robot index.html
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ with open_key(

## Usage with [Robot Testing Framework](https://robotframework.org/)

### Documentation

https://shpaker.github.io/winregistry/winregistry.robot

### Example

```robotframework
*** Variables ***
${ SUITE_KEY_NAME } HKLM\\SOFTWARE\\_ROBOT_TESTS_
Expand Down
5 changes: 5 additions & 0 deletions winregistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,11 @@ class robot: # noqa: N801
def registry_key_should_exist(
key_name: str,
) -> None:
"""
specified key should exist
Args:
key_name: sub_key is a string that identifies the sub_key to open
"""
with open_key(
key_name,
sub_key_ensure=False,
Expand Down
Loading

0 comments on commit 3cf2878

Please sign in to comment.