chore(tests): rootless machine creation test added #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Execute pnpm | |
run: pnpm install | |
- name: Run Build | |
timeout-minutes: 20 | |
run: pnpm 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-24.04 | |
timeout-minutes: 40 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Execute pnpm | |
run: pnpm install | |
- 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: pnpm 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: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Execute pnpm | |
run: pnpm install | |
- name: Run Build | |
timeout-minutes: 40 | |
run: pnpm 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-24.04] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Execute pnpm | |
run: pnpm install | |
- name: Run linter | |
run: pnpm lint:check | |
- name: Run formatter | |
run: pnpm format:check | |
- name: Run unit tests | |
run: pnpm test:unit | |
- name: Run typecheck | |
run: pnpm typecheck | |
- name: Run svelte check | |
run: pnpm svelte:check | |
# Check we don't have changes in git | |
- name: Check no changes in git | |
if: ${{ matrix.os=='ubuntu-24.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 | |
- 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 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Execute pnpm | |
run: pnpm install | |
- name: Run E2E smoke tests | |
run: pnpm test:e2e:smoke | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: smoke-e2e-tests | |
path: | | |
./tests/output/ | |
./tests/**/output/junit*.xml | |
!./tests/**/traces/raw |