Skip to content

Commit

Permalink
把单元测试和 UI 测试分成两个工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
tangshimin committed Sep 18, 2024
1 parent 3cebb3f commit d8d998b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
- name: Run unit tests
run: ./gradlew test

- name: Run UI tests
run: ./gradlew uiTest

- name: Package DMG on macOS
if: startsWith(matrix.os, 'macos')
run: ./gradlew packageDmg
run: ./gradlew packageDmg
45 changes: 45 additions & 0 deletions .github/workflows/UI Test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test

on:
workflow_dispatch:
push:
branches:
- master

jobs:
test:
name: Run Tests on ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-13, macos-latest]
include:
- os: windows-latest
arch: x64
name: Windows x86_64
- os: macos-13
arch: x64
name: macOS x86_64
- os: macos-latest
arch: aarch64
name: macOS aarch64
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'

- name: Set up Gradle
uses: gradle/gradle-build-action@v3

- name: Set execute permissions on gradlew
if: runner.os != 'Windows'
run: chmod +x ./gradlew

- name: Run UI tests
run: ./gradlew uiTest

0 comments on commit d8d998b

Please sign in to comment.