From e3593a6e200e56ed39b09f3866c03178bd16ea4f Mon Sep 17 00:00:00 2001 From: Rapha <25059996+sdrapha@users.noreply.github.com> Date: Mon, 8 May 2023 22:30:05 -0400 Subject: [PATCH 1/3] Create github actions for automated validation --- .github/workflows/tests.yml | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..954983a --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,58 @@ +name: Tests + +on: + workflow_dispatch: + push: + pull_request: + +jobs: + Validation: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: 'Use Python 3.8' + uses: actions/setup-python@v4 + with: + python-version: '3.8' + - run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + name: 'Install dependencies' + - run: | + pip install flake8 flake8-docstrings + flake8 src/pyvesync + name: 'Flake8' + - run: | + pip install pylint + pylint src/pyvesync + name: 'Pylint' + - run: | + pip install mypy + mypy src/pyvesync + python3 -m pip install types-requests + name: 'MyPy' + + pytest: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.8' + - '3.9' + - '3.10' + - '3.11' + steps: + - name: 'Use Python ${{matrix.python-version}}' + uses: actions/setup-python@v4 + with: + python-version: ${{matrix.python-version}} + - run: | + set -e + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pytest pytest-sugar pyyaml + name: 'Install dependencies' + - run: | + pytest --junitxml=reports/pytest.xml + name: 'Run Tests' \ No newline at end of file From aafff3028c05a6c17c823f8b552b021bcd71ed8d Mon Sep 17 00:00:00 2001 From: Rapha <25059996+sdrapha@users.noreply.github.com> Date: Mon, 8 May 2023 22:40:14 -0400 Subject: [PATCH 2/3] Github actions to automate validation --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 954983a..718b0b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,8 +29,8 @@ jobs: name: 'Pylint' - run: | pip install mypy - mypy src/pyvesync python3 -m pip install types-requests + mypy src/pyvesync name: 'MyPy' pytest: @@ -43,6 +43,8 @@ jobs: - '3.10' - '3.11' steps: + - name: Checkout repo + uses: actions/checkout@v3 - name: 'Use Python ${{matrix.python-version}}' uses: actions/setup-python@v4 with: From 174acede2b1f8205a92bd352d65f204fce133ebe Mon Sep 17 00:00:00 2001 From: Joe Trabulsy Date: Fri, 24 Jan 2025 19:38:03 -0500 Subject: [PATCH 3/3] Remove python 3.8 --- .github/workflows/tests.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 718b0b8..a17de94 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,10 +11,10 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v3 - - name: 'Use Python 3.8' + - name: 'Use Python 3.9' uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.9' - run: | python -m pip install --upgrade pip pip install -r requirements.txt @@ -32,19 +32,17 @@ jobs: python3 -m pip install types-requests mypy src/pyvesync name: 'MyPy' - pytest: runs-on: ubuntu-latest strategy: matrix: python-version: - - '3.8' - '3.9' - '3.10' - - '3.11' + - '3.11' steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v3 - name: 'Use Python ${{matrix.python-version}}' uses: actions/setup-python@v4 with: