From d14135581747f378caf931ce0f7eef40669b088b Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sun, 28 Aug 2022 12:26:57 -0700 Subject: [PATCH] Add .github/workflows/ci.yaml --- .github/workflows/ci.yaml | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..1d1b037d --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,57 @@ +name: CI + +# yamllint disable-line rule:truthy +on: + push: + branches: + - dev + - rc + - master + pull_request: ~ + +env: + CACHE_VERSION: 1 + PIP_CACHE_VERSION: 1 + HA_SHORT_VERSION: 2022.9 + DEFAULT_PYTHON: 3.9 + PRE_COMMIT_CACHE: ~/.cache/pre-commit + PIP_CACHE: /tmp/pip-cache + SQLALCHEMY_WARN_20: 1 + PYTHONASYNCIODEBUG: 1 + HASS_CI: 1 + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + + base: + name: Prepare dependencies + runs-on: ubuntu-20.04 + needs: info + timeout-minutes: 60 + strategy: + matrix: + python-version: ["3.9", "3.10"] + steps: + - name: Check out code from GitHub + uses: actions/checkout@v3.0.2 + - name: Check out code from GitHub + uses: actions/checkout@v3.0.2 + with: + repository: home-assistant/core + path: homeassistant + - name: Set up Python ${{ matrix.python-version }} + id: python + uses: actions/setup-python@v4.1.0 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -e homeassistant/ + - name: Run pytest + timeout-minutes: 60 + run: | + pytest tests