From 629aa604002184fdb5bf7c0b128a23c403cd0733 Mon Sep 17 00:00:00 2001 From: szymonrybczak Date: Fri, 10 May 2024 15:39:00 +0200 Subject: [PATCH] ci: skip windows e2e tests in specific scenario --- .github/workflows/test.yml | 66 ++++++++++++++++++++++-- packages/cli-platform-apple/src/index.ts | 1 + 2 files changed, 62 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3866e1386..1a2e22737 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,18 @@ on: branches: ['**'] jobs: + changes: + runs-on: ubuntu-latest + outputs: + skip: ${{ steps.skip-check.outputs.skip }} + steps: + - id: skip-check + uses: dorny/paths-filter@v2 + with: + filters: | + e2e: + - 'packages/cli-platform-ios/**' + - 'packages/cli-platform-apple/**' lint: name: Lint runs-on: ubuntu-latest @@ -45,7 +57,7 @@ jobs: strategy: matrix: node-version: [18, 20] - os: [ubuntu-latest, macos-latest, windows-2019] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} defaults: run: @@ -70,10 +82,6 @@ jobs: with: python-version: '3.10' - - name: Add msbuild to PATH - if: runner.os == 'windows' - uses: microsoft/setup-msbuild@v1.3 - - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: @@ -90,3 +98,51 @@ jobs: - name: E2E tests run: yarn test:ci:e2e + + e2e-tests-windows: + name: E2E Tests Windows + needs: changes + if: needs.changes.outputs.skip == 'false' # Only runs if changes NOT detected in listed paths + strategy: + matrix: + node-version: [18, 20] + os: [windows-2019] + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 17 + + - uses: gradle/actions/setup-gradle@v3 + + - uses: actions/setup-python@v4 + if: runner.os == 'macOS' + with: + python-version: '3.10' + + - name: Add msbuild to PATH + if: runner.os == 'windows' + uses: microsoft/setup-msbuild@v1.3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: yarn + + - name: Setup Git user + run: | + git config --global user.name "test" + git config --global user.email "test@test.com" + + - name: Install dependencies + run: yarn --frozen-lockfile + + - name: E2E tests + run: yarn test:ci:e2e diff --git a/packages/cli-platform-apple/src/index.ts b/packages/cli-platform-apple/src/index.ts index ec0011f04..1056ec7d3 100644 --- a/packages/cli-platform-apple/src/index.ts +++ b/packages/cli-platform-apple/src/index.ts @@ -17,3 +17,4 @@ export {default as installPods} from './tools/installPods'; export {default as findXcodeProject} from './config/findXcodeProject'; export {default as findPbxprojFile} from './config/findPbxprojFile'; +console.log('do not fire win CI');