Skip to content

Run validate workflow on windows too #7358

Run validate workflow on windows too

Run validate workflow on windows too #7358

Workflow file for this run

name: Validate
on: [push, pull_request]
jobs:
skip_check:
name: Check concurrent runs
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- uses: fkirc/skip-duplicate-actions@v5
id: skip_check
with:
concurrent_skipping: same_content_newer
cancel_others: true
# We want to skip only concurrent runs. Subsequent runs/retries should be allowed.
skip_after_successful_duplicate: false
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: Lint & Test
needs: skip_check
if: needs.skip_check.outputs.should_skip != 'true'
runs-on: ${{ matrix.os }}
env:
CI: true
JEST_CACHE_DIR: /tmp/jest-cache
timeout-minutes: 30
steps:
- name: Check out Repo
uses: actions/checkout@v4
- id: pnpm-setup
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version-file: package.json
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Cache babel-loader
id: babel-loader-cache
uses: actions/cache@v4
with:
path: 'fixtures/*/node_modules/.cache/babel-loader'
key: babel-loader-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }}
- name: Install Puppeteer
if: steps.puppeteer-cache.outputs.cache-hit != 'true'
run: pnpm puppeteer browsers install chrome
- name: Set up hosts linux
if: matrix.os == 'ubuntu-latest'
# Couldn't get `sudo pnpm setup-test-hosts` to work
run: sudo ${{ steps.pnpm-setup.outputs.bin_dest }}/pnpm setup-test-hosts
- name: Set up hosts windows
if: matrix.os == 'windows-latest'
run: pnpm setup-test-hosts
- name: Lint
run: pnpm lint
- name: Cache Jest cache
uses: actions/cache@v4
with:
path: $JEST_CACHE_DIR
key: jest-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: jest-${{ runner.os }}-
- name: Test
run: pnpm run test --cacheDirectory $JEST_CACHE_DIR && pnpm run test:sku-init