diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f7f46307..8e5a27e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,12 @@ name: Build -on: - push: - branches: [ actions ] +on: [ push, pull_request ] + +env: + project: Source/OCHamcrest.xcodeproj + jobs: - build: - name: Build + name: Build without tests runs-on: macos-latest strategy: matrix: @@ -17,32 +18,22 @@ jobs: - name: Check out project uses: actions/checkout@v2 - name: Show current version of Xcode - run: xcode-select -p - - name: Show Build Settings - run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme '${{ matrix.run-config['scheme'] }}' -showBuildSettings - - name: Show Build SDKs - run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme '${{ matrix.run-config['scheme'] }}' -showsdks - - name: Show Available Destinations - run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme '${{ matrix.run-config['scheme'] }}' -showdestinations + run: xcodebuild -version - name: Build - run: xcodebuild build -project Source/OCHamcrest.xcodeproj -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' | xcpretty + run: xcodebuild build -project $project -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' | xcpretty test: - name: Build, Test, Coverage + name: Build, test, report coverage runs-on: macos-latest + env: + scheme: OCHamcrest steps: - name: Check out project uses: actions/checkout@v2 - name: Show current version of Xcode - run: xcode-select -p - - name: Show Build Settings - run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme 'OCHamcrest' -showBuildSettings - - name: Show Build SDKs - run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme 'OCHamcrest' -showsdks - - name: Show Available Destinations - run: xcodebuild -project Source/OCHamcrest.xcodeproj -scheme 'OCHamcrest' -showdestinations + run: xcodebuild -version - name: Build & test - run: xcodebuild test -project Source/OCHamcrest.xcodeproj -scheme OCHamcrest -sdk macosx | xcpretty + run: xcodebuild test -project $project -scheme $scheme -sdk macosx | xcpretty - name: Install gems run: | bundle config path vendor/bundle