Skip to content

Commit

Permalink
chore(eventsub): run pytest in ci (#5920)
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada authored Feb 7, 2025
1 parent 02405b9 commit 0d02a63
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,33 @@ jobs:
plugins: gcov
fail_ci_if_error: true
verbose: true

eventsub-test:
name: "EventSub python test"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies
run: |
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
python3 python3-venv clang-18 clang-format-18 libclang-18-dev
echo "LIBCLANG_LIBRARY_FILE=/usr/lib/x86_64-linux-gnu/libclang-18.so" >> "$GITHUB_ENV"
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 42
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 42
- name: Setup virtual environment
run: |
python3 -m venv venv
./venv/bin/pip3 install -r requirements.txt
./venv/bin/pip3 install -r requirements-dev.txt
working-directory: lib/twitch-eventsub-ws/ast

- name: Run pytest
run: |
./venv/bin/pytest
working-directory: lib/twitch-eventsub-ws/ast
7 changes: 5 additions & 2 deletions lib/twitch-eventsub-ws/ast/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Test runner - run pytest in this dir to run tests
pytest==8.3.4

black==23.3.0
flake8==6.0.0
mypy==1.3.0
flake8==7.1.1
mypy==1.15.0
isort==5.12.0
12 changes: 9 additions & 3 deletions lib/twitch-eventsub-ws/ast/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# parsing of header files
clang==15.0.7
Jinja2==3.1.2

# ensures formatting of generated files is consistent
clang-format==16.0.6

# used for generating the code
Jinja2==3.1.5
jinja2-workarounds==0.1.0
clang-format==16.0.4

# colors for logging
colorama==0.4.6
pytest==7.3.1

0 comments on commit 0d02a63

Please sign in to comment.