Skip to content

Commit

Permalink
Revert "Use Ubuntu runner for check-quality and build-documentation j…
Browse files Browse the repository at this point in the history
…obs"

This reverts commit 63453a7.
  • Loading branch information
waliid committed Dec 2, 2024
1 parent 79ac0b6 commit 216d4d6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions Scripts/check-quality.sh
Original file line number Diff line number Diff line change
@@ -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..."
Expand Down
2 changes: 1 addition & 1 deletion hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 216d4d6

Please sign in to comment.