Skip to content

Commit

Permalink
Use Ubuntu runner for check-quality and build-documentation jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
waliid committed Nov 30, 2024
1 parent 861585e commit a49191c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 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: macos-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
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

# - name: Run the quality check
# run: make check-quality
- name: Build the documentation
run: make doc

# build-documentation:
# name: "📚 Build documentation"
# tests:
# name: "🧪 Tests"
# runs-on: macos-latest
# strategy:
# matrix:
# platform: [ios, tvos]
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

# - 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 }}
# - name: Run tests
# run: make test-${{ matrix.platform }}

# archive-demos:
# name: "📦 Archives"
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ all: help
install-pkgx:
@echo "Installing pkgx..."
@curl -Ssf https://pkgx.sh | sh &> /dev/null
@export PATH="/usr/local/bin:$PATH"
@echo "... done.\n"

.PHONY: install-bundler
Expand Down
4 changes: 2 additions & 2 deletions Scripts/check-quality.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash

set -e
set -xe

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 only-changes; then
if Scripts/check-quality.sh --only-changes; then
echo "✅ Quality checked"
else
echo "❌ Quality check failed"
Expand Down

0 comments on commit a49191c

Please sign in to comment.