Skip to content

Commit dd8ec1a

Browse files
authored
Merge pull request #20 from pymodbus-dev/gha
Add basic GitHub actions workflow
2 parents 0b13f15 + d05af3a commit dd8ec1a

File tree

6 files changed

+614
-431
lines changed

6 files changed

+614
-431
lines changed

.github/workflows/python-package.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: repl
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
test:
14+
15+
name: ${{ matrix.python-version }}
16+
runs-on: "ubuntu-latest"
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.9", "3.10", "3.11", "3.12"]
21+
22+
steps:
23+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
26+
with:
27+
allow-prereleases: true
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade poetry
32+
python -m poetry install
33+
- name: Lint with ruff
34+
run: |
35+
poetry run ruff check .
36+
- name: Check types with mypy
37+
run: |
38+
poetry run mypy pymodbus_repl
39+
- name: Pytest
40+
run: |
41+
poetry run pytest

0 commit comments

Comments
 (0)