From 478a785e94371803a86c4f789ae1a8633112e888 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Mon, 9 Dec 2024 23:31:34 +0700 Subject: [PATCH] [ci] Test multiple OS with latest Node version Signed-off-by: Viet Nguyen Duc --- .github/workflows/test.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 062633c2b..b135ffdd3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,7 @@ name: 'Test Selenium IDE' on: + workflow_dispatch: pull_request: branches: - trunk @@ -19,26 +20,35 @@ jobs: repository-projects: read security-events: read statuses: read - runs-on: ubuntu-latest + strategy: + matrix: + include: + - os: ubuntu-latest + - os: windows-latest + - os: macos-latest + runs-on: ${{ matrix.os }} if: github.repository == 'seleniumhq/selenium-ide' steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 with: - version: 8.11.0 + version: 'latest' - uses: actions/setup-node@v3 with: - node-version: '20.x' + node-version: 'latest' cache: 'pnpm' - name: Install dependencies run: pnpm -r i - name: Build side-runner and selenium-ide run: npm run build - name: Install xvfb - run: sudo apt-get update -y && sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb - - name: Run all tests and also use xvfb + if: matrix.os == 'ubuntu-latest' run: | + sudo apt-get update -y && sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 & - export DISPLAY=:99 + echo "DISPLAY=:99" >> $GITHUB_ENV + - name: Run all tests + run: | npm run test:ci