From 57503fe62df80997f0507bf6914a8f8ef55790fb 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 | 71 ++++++++++++++++++++++-- packages/cli-config/src/index.ts | 1 + packages/cli-platform-apple/src/index.ts | 1 + 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3866e1386..501686b54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,24 @@ on: branches: ['**'] jobs: + changes: + runs-on: ubuntu-latest + outputs: + is_specific: ${{ steps.path-check.outputs.specific_dir }} + is_others: ${{ steps.path-check.outputs.others }} + steps: + - id: path-check + uses: dorny/paths-filter@v2 + with: + list-files: shell + filters: | + specific_dir: + - 'packages/cli-platform-ios/**' + - 'packages/cli-platform-apple/**' + others: + - '**' + - '!packages/cli-platform-ios/**' + - '!packages/cli-platform-apple/**' lint: name: Lint runs-on: ubuntu-latest @@ -45,7 +63,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 +88,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 +104,50 @@ jobs: - name: E2E tests run: yarn test:ci:e2e + + e2e-tests-windows: + needs: changes + if: needs.changes.outputs.is_specific == 'true' && needs.changes.outputs.is_others == 'false' + runs-on: windows-latest + strategy: + matrix: + node-version: [18, 20] + os: [windows-2019] + 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-config/src/index.ts b/packages/cli-config/src/index.ts index f12851649..f49d9544a 100644 --- a/packages/cli-config/src/index.ts +++ b/packages/cli-config/src/index.ts @@ -3,3 +3,4 @@ import config from './commands/config'; export {default} from './loadConfig'; export const commands = [config]; +console.log('elo'); 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');