From 306322704cdd15d481b44cc5e14ecc02b18841d1 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 20 Feb 2023 13:10:33 +0100 Subject: [PATCH] Update CI runner to ubuntu-22.04 (#88420) --- .github/workflows/ci.yaml | 42 ++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d4def281065..6c8c6b88b06 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -76,7 +76,7 @@ jobs: test_groups: ${{ steps.info.outputs.test_groups }} tests_glob: ${{ steps.info.outputs.tests_glob }} tests: ${{ steps.info.outputs.tests }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Check out code from GitHub uses: actions/checkout@v3.3.0 @@ -195,7 +195,7 @@ jobs: pre-commit: name: Prepare pre-commit base - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: | github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' @@ -241,7 +241,7 @@ jobs: lint-black: name: Check black - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: - info - pre-commit @@ -287,7 +287,7 @@ jobs: lint-flake8: name: Check flake8 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: - info - pre-commit @@ -336,7 +336,7 @@ jobs: lint-ruff: name: Check ruff - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: - info - pre-commit @@ -385,7 +385,7 @@ jobs: lint-isort: name: Check isort - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: - info - pre-commit @@ -423,7 +423,7 @@ jobs: lint-other: name: Check other linters - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: - info - pre-commit @@ -540,7 +540,7 @@ jobs: base: name: Prepare dependencies - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: info timeout-minutes: 60 strategy: @@ -606,7 +606,7 @@ jobs: hassfest: name: Check hassfest - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: | github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' @@ -638,7 +638,7 @@ jobs: gen-requirements-all: name: Check all requirements - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: | github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' @@ -670,7 +670,7 @@ jobs: pylint: name: Check pylint - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 20 if: | github.event.inputs.mypy-only != 'true' @@ -715,7 +715,7 @@ jobs: mypy: name: Check mypy - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: | github.event.inputs.pylint-only != 'true' || github.event.inputs.mypy-only == 'true' @@ -776,7 +776,7 @@ jobs: mypy homeassistant/components/${{ needs.info.outputs.integrations_glob }} pip-check: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: | github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' @@ -812,7 +812,7 @@ jobs: ./script/pip_check $PIP_CACHE pytest: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: | (github.event_name != 'push' || github.event.repository.full_name == 'home-assistant/core') && github.event.inputs.lint-only != 'true' @@ -929,7 +929,7 @@ jobs: ./script/check_dirty pytest-mariadb: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 services: mariadb: image: ${{ matrix.mariadb-group }} @@ -1033,7 +1033,7 @@ jobs: ./script/check_dirty pytest-postgres: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 services: postgres: image: ${{ matrix.postgresql-group }} @@ -1071,7 +1071,7 @@ jobs: sudo apt-get -y install \ bluez \ ffmpeg \ - postgresql-server-dev-12 + postgresql-server-dev-14 - name: Check out code from GitHub uses: actions/checkout@v3.1.0 - name: Set up Python ${{ matrix.python-version }} @@ -1085,13 +1085,9 @@ jobs: uses: actions/cache@v3.2.5 with: path: venv + fail-on-cache-miss: true key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ needs.info.outputs.python_cache_key }} - - name: Fail job if Python cache restore failed - if: steps.cache-venv.outputs.cache-hit != 'true' - run: | - echo "Failed to restore Python virtual environment from cache" - exit 1 - name: Register Python problem matcher run: | echo "::add-matcher::.github/workflows/matchers/python.json" @@ -1143,7 +1139,7 @@ jobs: coverage: name: Upload test coverage to Codecov - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: - info - pytest