Run test manually #18
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: 'Run test manually' | |
on: | |
workflow_dispatch: | |
inputs: | |
os: | |
description: 'OS to run test on' | |
required: true | |
type: choice | |
options: | |
- ubuntu | |
- windows | |
- macos | |
container: | |
description: 'Container image to run test on' | |
required: false | |
type: string | |
chrome-version-1: | |
description: 'Chrome version to install' | |
required: false | |
type: string | |
chrome-version-2: | |
description: 'Chrome version to install' | |
required: false | |
type: string | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm lint | |
- run: pnpm test | |
- run: pnpm build | |
- run: pnpm package | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: ./dist/ | |
test: | |
needs: [build] | |
runs-on: ${{ inputs.os }}-latest | |
container: ${{ inputs.container }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
- name: Install chrome | |
uses: ./ | |
with: | |
chrome-version: ${{ inputs.chrome-version-1 }} | |
- name: Install chrome | |
uses: ./ | |
with: | |
chrome-version: ${{ inputs.chrome-version-2 }} | |
id: setup-chrome | |
- if: runner.os == 'Linux' || runner.os == 'macOS' | |
run: | | |
"${{ steps.setup-chrome.outputs.chrome-path }}" --version | |
- if: runner.os == 'Windows' | |
run: | | |
(Get-Item (Get-Command "${{ steps.setup-chrome.outputs.chrome-path }}").Source).VersionInfo.ProductVersion |