From 440e7f047f5b42a106a0e24adc70ef3b5063efae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Gr=C3=BCter?= Date: Tue, 31 Oct 2023 10:52:10 +0100 Subject: [PATCH] Add github workflos: python, hassfest --- .github/workflows/hassfest.yaml | 14 ++++++++++++++ .github/workflows/pythonpackage.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/hassfest.yaml create mode 100644 .github/workflows/pythonpackage.yaml diff --git a/.github/workflows/hassfest.yaml b/.github/workflows/hassfest.yaml new file mode 100644 index 0000000..07d1dda --- /dev/null +++ b/.github/workflows/hassfest.yaml @@ -0,0 +1,14 @@ +name: Validate with hassfest + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + +jobs: + validate: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v3" + - uses: home-assistant/actions/hassfest@master diff --git a/.github/workflows/pythonpackage.yaml b/.github/workflows/pythonpackage.yaml new file mode 100644 index 0000000..9ad32df --- /dev/null +++ b/.github/workflows/pythonpackage.yaml @@ -0,0 +1,27 @@ +name: Python package + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.10] + + steps: + - uses: actions/checkout@v3 + - 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 + pip install -r requirements.test.txt + + - name: Run pytest + run: | + pytest