Update dependency freelensapp/freelens-k8s-proxy to v1.2.1 #131
Workflow file for this run
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
name: Integration tests | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
jobs: | |
test-integration: | |
name: integration tests on ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
arch: x64 | |
targets: AppImage deb rpm | |
- os: macos-14 | |
arch: arm64 | |
targets: dmg pkg | |
- os: windows-2022 | |
arch: x64 | |
targets: msi nsis | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Get npm cache directory | |
shell: bash | |
run: echo "npm_cache_dir=$(npm config get cache)" >> ${GITHUB_ENV} | |
- name: Use npm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.npm_cache_dir }} | |
key: ${{ matrix.os }}-${{ matrix.arch }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ matrix.os }}-${{ matrix.arch }}-node- | |
- name: Install dependencies (macOS) | |
if: runner.os == 'macOS' | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_on: any | |
command: brew install python-setuptools | |
- name: Install minikube (Linux) | |
if: runner.os == 'Linux' | |
uses: medyagh/setup-minikube@master | |
with: | |
kubernetes-version: v1.31.0 | |
- name: Install npm dependencies | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_on: any | |
command: npm ci | |
env: | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1" | |
- name: Detect Playwright version | |
shell: bash | |
run: echo "PLAYWRIGHT_VERSION=$(npm ll -p --depth=0 playwright | cut -d@ -f2)" >> $GITHUB_ENV | |
- name: Put $HOME in env (Windows) | |
if: runner.os == 'windows' | |
run: echo "HOME=$HOME" | Out-File -FilePath $env:GITHUB_ENV -Append | |
- name: Use Playwright cache | |
uses: actions/cache@v4 | |
id: playwright-cache | |
with: | |
path: ${{ runner.os == 'Windows' && format('{0}{1}', env.HOME, '\AppData\Local\ms-playwright') || runner.os == 'Linux' && '~/.cache/ms-playwright' || '~/Library/Caches/ms-playwright' }} | |
key: ${{ matrix.os }}-${{ matrix.arch }}-playwright-${{ env.PLAYWRIGHT_VERSION }} | |
restore-keys: | | |
${{ matrix.os }}-${{ matrix.arch }}-playwright- | |
- name: Install Playwright with dependencies | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: npx playwright install --with-deps | |
- name: Install Playwright's dependencies | |
if: steps.playwright-cache.outputs.cache-hit == 'true' | |
run: npx playwright install-deps | |
- name: Build NPM packages (macOS x64, Linux arm64) | |
if: runner.os == 'macOS' && matrix.arch == 'x64' || runner.os == 'Linux' && matrix.arch == 'arm64' | |
run: npm run build | |
env: | |
DOWNLOAD_ALL_ARCHITECTURES: "true" | |
- name: Build NPM packages (macOS arm64, Linux x64, Windows) | |
if: runner.os == 'macOS' && matrix.arch == 'arm64' || runner.os == 'Linux' && matrix.arch == 'x64' || runner.os == 'Windows' | |
run: npm run build | |
- name: Build Electron app | |
run: npm run build:app -- -- -- dir ${{ matrix.targets }} --publish=never --${{ matrix.arch }} | |
- name: Run integration tests (Linux) | |
if: runner.os == 'Linux' | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 3 | |
retry_on: timeout | |
command: | | |
sudo chown root:root freelens/dist/linux-unpacked/chrome-sandbox | |
sudo chmod 4755 freelens/dist/linux-unpacked/chrome-sandbox | |
xvfb-run -a npm run test:integration | |
env: | |
DEBUG: pw:browser | |
- name: Run integration tests (macOS, Windows) | |
if: runner.os != 'Linux' | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 3 | |
retry_on: timeout | |
command: npm run test:integration | |
env: | |
DEBUG: pw:browser | |
- name: Clean after tests | |
run: npm run clean | |
- name: Check untracked files | |
shell: bash | |
run: for f in $(git ls-files --others --exclude-standard); do git diff --no-index --stat --exit-code /dev/null $f; done |