Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build and test
run-name: Build and test PR${{ github.event.number }}
name: Native test
run-name: Native test PR${{ github.event.number }}

on:
workflow_dispatch:
Expand All @@ -8,42 +8,15 @@ on:
- main
tags:
- '*'
paths-ignore:
- 'lglpy/**'
pull_request:
branches:
- main
paths-ignore:
- 'lglpy/**'

jobs:
python-test:
name: Python tests
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Get Python modules
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pycodestyle mypy

- name: Check code style
run: |
python3 -m pycodestyle --config .pycodestyle.ini ./*.py
python3 -m pycodestyle --config .pycodestyle.ini ./lglpy
python3 -m pycodestyle --config .pycodestyle.ini ./generator

- name: Check typing
run: |
python3 -m mypy ./*.py
python3 -m mypy ./lglpy
python3 -m mypy ./generator

- name: Run unit tests
# Note: Only run tests that do not require a connected device
run: |
python3 -m lglpy.ui.test

build-ubuntu-x64-clang:
name: Ubuntu x64 Clang
runs-on: ubuntu-22.04
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/python_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Python test
run-name: Python test PR${{ github.event.number }}

on:
workflow_dispatch:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main

jobs:
python-test:
name: Python tests
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Get Python modules
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pycodestyle mypy

- name: Check code style
run: |
python3 -m pycodestyle --config .pycodestyle.ini ./*.py
python3 -m pycodestyle --config .pycodestyle.ini ./lglpy
python3 -m pycodestyle --config .pycodestyle.ini ./generator

- name: Check typing
run: |
python3 -m mypy ./*.py
python3 -m mypy ./lglpy
python3 -m mypy ./generator

- name: Run unit tests
# Note: Only run tests that do not require a connected device
run: |
python3 -m lglpy.ui.test