Skip to content

Commit

Permalink
ci: skip windows e2e tests in specific scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed May 10, 2024
1 parent 0bcdb73 commit 57503fe
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 5 deletions.
71 changes: 66 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
1 change: 1 addition & 0 deletions packages/cli-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ import config from './commands/config';
export {default} from './loadConfig';

export const commands = [config];
console.log('elo');
1 change: 1 addition & 0 deletions packages/cli-platform-apple/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

0 comments on commit 57503fe

Please sign in to comment.