Skip to content

Commit

Permalink
ci: skip windows e2e tests in specific scenario (#2386)
Browse files Browse the repository at this point in the history
* ci: skip windows e2e tests in specific scenario

* chore: log values

* chore: remove leftovers
  • Loading branch information
szymonrybczak committed May 12, 2024
1 parent 0bcdb73 commit 21a82d4
Showing 1 changed file with 66 additions and 5 deletions.
71 changes: 66 additions & 5 deletions .github/workflows/test.yml
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_others == 'true'
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

0 comments on commit 21a82d4

Please sign in to comment.