diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9a41903e..2d9bc251 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -4,38 +4,38 @@ name: Pull Request on: push # yamllint disable-line rule:truthy jobs: - check-quality: - name: "๐Ÿ”Ž Check quality" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Run the quality check - run: make check-quality - - build-documentation: - name: "๐Ÿ“š Build documentation" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 + # check-quality: + # name: "๐Ÿ”Ž Check quality" + # runs-on: macos-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 - - name: Build the documentation - run: make doc + # - name: Run the quality check + # run: make check-quality - # tests: - # name: "๐Ÿงช Tests" + # build-documentation: + # name: "๐Ÿ“š Build documentation" # runs-on: macos-latest - # strategy: - # matrix: - # platform: [ios, tvos] # steps: # - name: Checkout code # uses: actions/checkout@v4 - # - name: Run tests - # run: make test-${{ matrix.platform }} + # - name: Build the documentation + # run: make doc + + tests: + name: "๐Ÿงช Tests" + runs-on: macos-latest + strategy: + matrix: + platform: [ios, tvos] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run tests + run: make test-${{ matrix.platform }} # archive-demos: # name: "๐Ÿ“ฆ Archives" diff --git a/Scripts/check-quality.sh b/Scripts/check-quality.sh index ff23f6f1..e31a467b 100755 --- a/Scripts/check-quality.sh +++ b/Scripts/check-quality.sh @@ -1,15 +1,14 @@ #!/bin/bash -set -xe - -eval "$(curl -Ssf https://pkgx.sh)" +set -e +eval "$(pkgx --shellcode)" env +swiftlint +rubocop +shellcheck +markdownlint +yamllint echo "... checking Swift code..." if [ $# -eq 0 ]; then swiftlint --quiet --strict -elif [[ "$1" == "--only-changes" ]]; then +elif [[ "$1" == "only-changes" ]]; then git diff --staged --name-only | grep ".swift$" | xargs swiftlint lint --quiet --strict fi echo "... checking Ruby scripts..." diff --git a/hooks/pre-commit b/hooks/pre-commit index c94c803e..b9a31b50 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -1,7 +1,7 @@ #!/bin/sh # Quality check -if Scripts/check-quality.sh; then +if Scripts/check-quality.sh only-changes; then echo "โœ… Quality checked" else echo "โŒ Quality check failed"