Skip to content

chore(tests): improve container start up error handling #11407

chore(tests): improve container start up error handling

chore(tests): improve container start up error handling #11407

Workflow file for this run

#
# Copyright (C) 2022 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: pr-check
on: [pull_request]
jobs:
windows:
name: Windows
runs-on: windows-2022
timeout-minutes: 60
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> ${env:GITHUB_OUTPUT}
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn
run: |
yarn --frozen-lockfile --network-timeout 180000
- name: Run Build
timeout-minutes: 20
run: yarn compile:pull-request
- name: List Build
run: ls ./dist/
- uses: actions/upload-artifact@v4
with:
name: windows-installer-x64
path: ./dist/podman-desktop*-setup-x64.exe
- uses: actions/upload-artifact@v4
with:
name: windows-installer-arm64
path: ./dist/podman-desktop*-setup-arm64.exe
- uses: actions/upload-artifact@v4
with:
name: windows-exe-x64
path: ./dist/podman-desktop*-next-x64.exe
- uses: actions/upload-artifact@v4
with:
name: windows-exe-arm64
path: ./dist/podman-desktop*-next-arm64.exe
linux:
name: Linux
runs-on: ubuntu-22.04
timeout-minutes: 40
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Execute yarn
run: yarn --frozen-lockfile --network-timeout 180000
- name: Install flatpak
run: |
sudo apt-get update
sudo apt-get install flatpak -y
sudo apt-get install flatpak-builder -y
sudo apt-get install elfutils -y
flatpak remote-add --if-not-exists flathub --user https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub --no-static-deltas --user -y org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08
- name: Run Build
timeout-minutes: 20
run: yarn compile:pull-request
- name: List Build
run: ls -la ./dist/
- uses: actions/upload-artifact@v4
with:
name: linux
path: ./dist/podman-desktop-*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: flatpak
path: ./dist/podman-desktop-*.flatpak
darwin:
name: macOS
runs-on: macos-14
timeout-minutes: 40
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Execute yarn
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: yarn --frozen-lockfile --network-timeout 180000
- name: Run Build
timeout-minutes: 40
run: yarn compile:pull-request
- name: List Build
run: ls -la ./dist/
- uses: actions/upload-artifact@v4
with:
name: macos-x64-dmg
path: ./dist/podman-desktop-*x64.dmg
- uses: actions/upload-artifact@v4
with:
name: macos-arm64-dmg
path: ./dist/podman-desktop-*arm64.dmg
- uses: actions/upload-artifact@v4
with:
name: macos-universal-dmg
path: ./dist/podman-desktop-*universal.dmg
lint-format-unit:
name: linter, formatters and unit tests / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
os: [windows-2022, ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Get yarn cache directory path (Windows)
if: ${{ matrix.os=='windows-2022' }}
id: yarn-cache-dir-path-windows
run: echo "dir=$(yarn cache dir)" >> ${env:GITHUB_OUTPUT}
- name: Get yarn cache directory path (mac/Linux)
if: ${{ matrix.os=='ubuntu-22.04'}}
id: yarn-cache-dir-path-unix
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4
if: ${{ matrix.os=='windows-2022' }}
id: yarn-cache-windows
with:
path: ${{ steps.yarn-cache-dir-path-windows.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v4
if: ${{ matrix.os=='ubuntu-22.04'}}
id: yarn-cache-unix
with:
path: ${{ steps.yarn-cache-dir-path-unix.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Execute yarn
run: yarn --frozen-lockfile --network-timeout 180000
- name: Run linter
run: yarn lint:check
- name: Run formatter
run: yarn format:check
- name: Run unit tests
run: yarn test:unit
- name: Run typecheck
run: yarn typecheck
- name: Run svelte check
run: yarn svelte:check
# Check we don't have changes in git
- name: Check no changes in git
if: ${{ matrix.os=='ubuntu-22.04'}}
run: |
if ! git diff --exit-code; then
echo "Found changes in git"
exit 1
fi
smoke-e2e-tests:
name: smoke e2e tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Update podman
run: |
sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list"
curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/Release.key" | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get -qq -y install podman || { echo "Start fallback steps for podman nightly installation from a static mirror" && \
sudo sh -c "echo 'deb http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list" && \
curl -L "http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/Release.key" | sudo apt-key add - && \
sudo apt-get update && \
sudo apt-get -y install podman; }
podman version
# downgrade conmon package version to workaround issue with starting containers, see https://github.com/containers/conmon/issues/475
# remove once the repository contains conmon 2.1.10
wget https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/amd64/conmon_2.1.2~0_amd64.deb -O /tmp/conmon_2.1.2.deb
sudo apt install /tmp/conmon_2.1.2.deb
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Execute yarn
run: yarn --frozen-lockfile
- name: Run E2E smoke tests
run: yarn test:e2e:smoke
- uses: actions/upload-artifact@v4
if: always()
with:
name: smoke-e2e-tests
path: ./tests/output/