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 629aa60
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 5 deletions.
66 changes: 61 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
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 629aa60

Please sign in to comment.