Convert endianness #6950
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- dev | |
- master | |
- wait_next_API | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- dev | |
- wait_next_api | |
types: [opened, synchronize, reopened, ready_for_review] | |
schedule: | |
# Sunday at 02:10 UTC. | |
- cron: '10 2 * * 0' | |
workflow_dispatch: | |
jobs: | |
faildraft: | |
name: fail draft | |
if: github.event.pull_request.draft == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: fail draft | |
run: | | |
exit 1 | |
testing: | |
name: ${{ matrix.os }} - ${{ matrix.python }} | |
if: github.event.pull_request.draft == false | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python: ['3.9', '3.10', '3.11', '3.12', "3.13.0"] | |
include: | |
- python: '3.9' | |
run_lint: true | |
- python: '3.13.0' | |
run_doc: true | |
run_lint: true | |
- os: macos-latest | |
run_doc: false | |
run_lint: false | |
- os: windows-latest | |
run_doc: false | |
run_lint: false | |
steps: | |
- name: Checkout repo from github | |
uses: actions/[email protected] | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Set venv path (NON Windows) | |
if: matrix.os != 'windows-latest' | |
run: | | |
echo "VIRTUAL_ENV=${{ github.workspace }}/venv" >> $GITHUB_ENV | |
echo ${{ github.workspace }}/venv/bin >> $GITHUB_PATH | |
- name: Set venv path (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
echo "VIRTUAL_ENV=${{ github.workspace }}\\venv" >> $Env:GITHUB_ENV | |
echo "${{ github.workspace }}\\venv\\Scripts" >> $Env:GITHUB_PATH | |
- name: Restore base Python virtual environment | |
id: cache-venv | |
uses: actions/[email protected] | |
with: | |
path: ${{ env.VIRTUAL_ENV }} | |
key: >- | |
${{ runner.os }}-${{ matrix.python }}-venv-${{ | |
hashFiles('pyproject.toml') }} | |
- name: Create venv (NEW CACHE) | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: | | |
python -m venv ${{ env.VIRTUAL_ENV }} | |
python -m pip install --upgrade pip | |
pip install -e ".[all]" | |
- name: codespell | |
if: matrix.run_doc == true | |
run: | | |
codespell | |
- name: dcoumentation | |
if: matrix.run_doc == true | |
run: | | |
cd doc; ./build_html | |
- name: pylint | |
if: matrix.run_lint == true | |
run: | | |
pylint --recursive=y examples pymodbus test | |
- name: mypy | |
if: matrix.run_lint == true | |
run: | | |
mypy pymodbus examples | |
- name: ruff | |
if: matrix.run_lint == true | |
run: | | |
ruff check . | |
- name: pytest | |
if: ${{ (matrix.os != 'ubuntu-latest') || (matrix.python != '3.13') }} | |
run: | | |
env | |
pytest | |
- name: pytest coverage | |
if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.python == '3.13') }} | |
run: | | |
env | |
pytest --cov | |
analyze: | |
name: Analyze Python | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/[email protected] | |
- uses: github/codeql-action/init@v3 | |
with: | |
languages: python | |
- uses: github/codeql-action/autobuild@v3 | |
- uses: github/codeql-action/analyze@v3 | |
ci_complete: | |
name: ci_complete | |
runs-on: ubuntu-latest | |
needs: | |
- analyze | |
- testing | |
timeout-minutes: 1 | |
steps: | |
- run: echo 'finish job' |