Linux #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux | |
on: | |
push: | |
branches: [ master, '*-ci' ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
build_linux: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: ["ubuntu-20.04", "ubuntu-22.04"] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 8 | |
- name: Set up Python ${{matrix.python-version}} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{matrix.python-version}} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools # necessary for pkg_resources on Python 3.12 | |
python -m pip install zserio | |
python -m pip install astroid==3.0.3 | |
python -m pip install pylint==3.0.3 | |
python -m pip install mypy==0.931 | |
- name: Check Zserio Python tutorial | |
run: | | |
mypy src --no-strict-optional | |
pylint src \ | |
--disable=line-too-long,missing-function-docstring,missing-module-docstring \ | |
--disable=missing-class-docstring,duplicate-code,unused-import,too-many-public-methods \ | |
--disable=invalid-name,unneeded-not,too-many-arguments,too-many-instance-attributes, \ | |
--disable=superfluous-parens,broad-exception-caught,too-few-public-methods | |
- name: Test Zserio Python tutorial | |
run: | | |
python src/main.py write_joe | |
python src/main.py read | |
python src/main.py write_boss | |
python src/main.py read | |
- name: Check Zserio Python tutorial (sources regeneration) | |
run: | | |
zserio tutorial.zs -python build/gen | |
mypy build/gen src/main.py --no-strict-optional | |
PYTHONPATH=. pylint build/gen src/main.py \ | |
--disable=line-too-long,missing-function-docstring,missing-module-docstring \ | |
--disable=missing-class-docstring,duplicate-code,unused-import,too-many-public-methods \ | |
--disable=invalid-name,unneeded-not,too-many-arguments,too-many-instance-attributes, \ | |
--disable=superfluous-parens,broad-exception-caught,too-few-public-methods | |
- name: Test Zserio Python tutorial (sources regeneration) | |
run: | | |
PYTHONPATH=build/gen python src/main.py write_joe | |
PYTHONPATH=build/gen python src/main.py read | |
PYTHONPATH=build/gen python src/main.py write_boss | |
PYTHONPATH=build/gen python src/main.py read |