Skip to content

Commit

Permalink
tweak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdavb committed Nov 1, 2023
1 parent d8ebb6c commit b40e41c
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 23 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/lint-mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Typing with mypy

on: workflow_dispatch
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install voluptuous
- name: Check with mypy
run: |
pip install mypy
mypy evohomeasync/ evohomeasync2/
- run: echo "🍏 This job's status is ${{ job.status }}."
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# https://docs.astral.sh/ruff/integrations/#github-actions

name: Lint with ruff
name: Linting with ruff

on: [push, pull_request]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package
name: Upload Python Package to PyPI

on:
release:
Expand All @@ -22,20 +22,20 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Test with pytest
name: Testing with pytest

on: workflow_dispatch
# push:
Expand All @@ -12,40 +12,24 @@ on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4


- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}


- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Lint with ruff
# https://docs.astral.sh/ruff/integrations/#github-actions
uses: chartboost/ruff-action@v1


- name: Check with mypy
run: |
pip install mypy
mypy .
- name: Install the package
run: |
pip install -e .
Expand Down

0 comments on commit b40e41c

Please sign in to comment.