diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml deleted file mode 100644 index 4cda4b0..0000000 --- a/.github/workflows/swift.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This workflow will build a Swift project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift - -name: Swift - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - name: Swift on macos-latest - # strategy: - # matrix: - # platform: [macOS, iOS, tvOS, watchOS] - # include: - # - platform: macOS - # destination: 'generic/platform=macOS' - # test_cmd: 'swift test' - # - platform: iOS - # destination: 'platform=iOS Simulator,name=iPhone 14' - # test_cmd: 'xcodebuild -scheme DFService test' - # - platform: tvOS - # destination: 'platform=tvOS Simulator,name=Apple TV 4K' - # test_cmd: 'xcodebuild -scheme DFService test' - # - platform: watchOS - # destination: 'platform=watchOS Simulator,name=Apple Watch Series 7' - # test_cmd: 'xcodebuild -scheme DFService test' - # os: [macos-12,macos-latest] - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - name: Build - run: swift build -v - - name: Run tests - run: swift test -v diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f739efc --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +name: Test on macOS and Linux + +on: + push: + branches: [main, dev] + pull_request: + branches: [main, dev] + +jobs: + macos: + name: Test on macOS + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: Run Tests (macOS) + run: swift test --enable-code-coverage + + linux: + name: Test on Linux + runs-on: ubuntu-latest + container: + image: swift:5.10 + steps: + - uses: actions/checkout@v3 + - name: Run Tests (Linux) + run: swift test