diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml index d3b8351..a2377f6 100644 --- a/.github/workflows/pr-check.yaml +++ b/.github/workflows/pr-check.yaml @@ -124,7 +124,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2022, ubuntu-24.04, macos-15] + os: [macos-14] # [windows-2022, ubuntu-24.04, macos-14] # only during PR development runs-on: ${{ matrix.os }} env: SKIP_INSTALLATION: true @@ -143,7 +143,7 @@ jobs: # Checkout sso extension - uses: actions/checkout@v4 - if: matrix.os == 'windows-2022' + if: matrix.os == 'windows-2022' || matrix.os = 'macos-14' with: repository: redhat-developer/podman-desktop-redhat-account-ext ref: main @@ -164,54 +164,16 @@ jobs: run: pnpm install - name: Install SSO extension dependencies - if: matrix.os == 'windows-2022' + if: matrix.os == 'windows-2022' || matrix.os = 'macos-14' working-directory: ./sso-extension run: pnpm install - - name: Install vfkit - if: matrix.os == 'macos-15' - run: | - brew install cfergeau/crc/vfkit - vfkit --version - - - name: Install Podman on macOS - if: matrix.os == 'macos-15' - run: | - ARCH=$(uname -m) - # echo "LATEST_RELEASE => ${LATEST_RELEASE}" - # echo "DOWNLOAD ADDRESS => https://github.com/containers/podman/releases/download/${LATEST_RELEASE}/podman-installer-macos-${ARCH}.pkg" - echo "DOWNLOAD ADDRESS V2 => https://github.com/containers/podman/releases/latest/download/podman-installer-macos-${ARCH}.pkg" - echo "CURL COMMAND =>" - # curl -LO -o ./podman-installer-macos-${ARCH}.pkg https://github.com/containers/podman/releases/download/${LATEST_RELEASE}/podman-installer-macos-${ARCH}.pkg - curl -LO https://github.com/containers/podman/releases/latest/download/podman-installer-macos-${ARCH}.pkg - - echo "INSTALL PACKAGED INSTALLER =>" - sudo installer -pkg podman-installer-macos-${ARCH}.pkg -target / - echo "ADD PODMAN DIRECTORY (/opt/podman/bin/podman) TO PATH =>" - # PODMAN_PATH_FULL=$(which podman) - # PODMAN_PATH=$(dirname $(which podman)) - # echo "PODMAN PATH (dirname(which podman)) => ${PODMAN_PATH} (FULL=${PODMAN_PATH_FULL})" - # echo "${PODMAN_PATH}" | sudo tee /etc/paths.d/podman_path - echo "PATH=/opt/podman/bin:$PATH" >> $GITHUB_ENV - - - name: Setup Podman machine on macOS - if: matrix.os == 'macos-15' - run: | - echo "START PODMAN MACHINE=>" - podman --version - # yes | podman machine reset - podman machine init - podman machine list - podman machine info - podman machine inspect - podman machine start --log-level debug - - name: Build Podman Desktop for E2E tests working-directory: ./podman-desktop run: pnpm test:e2e:build - name: Ensure getting current HEAD version of the test framework (Ubuntu/MacOS) - if: matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-15' + if: matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-14' working-directory: ./crc-extension run: | # workaround for https://github.com/containers/podman-desktop-extension-bootc/issues/712 @@ -253,8 +215,8 @@ jobs: # allow unprivileged user namespace sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - - name: Build OpenShift Local extension from container file and SSO dependency (Ubuntu/MacOS, podman) - if: matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-15' + - name: Build OpenShift Local extension from container file and SSO dependency (Ubuntu, podman) + if: matrix.os == 'ubuntu-24.04' working-directory: ./crc-extension run: | # build crc extension @@ -273,8 +235,22 @@ jobs: mv tests/playwright/output/crc-tests-pd/plugins/extension/ tests/playwright/output/crc-tests-pd/plugins/crcextension tar -xf /tmp/sso_extension.tar -C tests/playwright/output/crc-tests-pd/plugins/ mv tests/playwright/output/crc-tests-pd/plugins/extension/ tests/playwright/output/crc-tests-pd/plugins/ssoextension - - - name: Build OpenShift Local extension locally (Windows, docker) #from container file is not available yet + + - name: Build OpenShift Local extension locally (MacOS) #from container file is not available yet + if: matrix.os == 'macos-14' + shell: bash + working-directory: ./crc-extension + run: | + # -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage -- + # build extension + yarn build + # make expected test folders + mkdir -p tests/playwright/output/crc-tests-pd/plugins/crcextension + mkdir -p tests/playwright/output/crc-tests-pd/plugins/ssoextension + # move necessary files there + cp -R package.json LICENSE icon.png README.md dist tests/playwright/output/crc-tests-pd/plugins/crcextension + + - name: Build OpenShift Local extension locally (Windows) #from container file is not available yet if: matrix.os == 'windows-2022' working-directory: ./crc-extension shell: pwsh @@ -289,7 +265,19 @@ jobs: # move necessary files there 'package.json', 'LICENSE', 'icon.png', 'README.md', 'dist' | % { cp $_ ./tests/playwright/output/crc-tests-pd/plugins/crcextension -Recurse -Force} - - name: Build SSO extension (crc dependency) locally (Windows, docker) #from container file is not available yet + - name: Build SSO extension (crc dependency) locally (MacOS) #from container file is not available yet + if: matrix.os == 'macos-14' + working-directory: ./sso-extension + shell: bash + run: | + # -- following https://github.com/redhat-developer/podman-desktop-redhat-account-ext/blob/main/Containerfile -- + # build extension + pnpm build + # put the contents into its expected folder: + mkdir -p ../crc-extension/tests/playwright/output/crc-tests-pd/plugins/ssoextension + cp -R ./builtin/redhat-authentication.cdix/* ../crc-extension/tests/playwright/output/crc-tests-pd/plugins/ssoextension + + - name: Build SSO extension (crc dependency) locally (Windows) #from container file is not available yet if: matrix.os == 'windows-2022' working-directory: ./sso-extension shell: pwsh