Skip to content

Commit

Permalink
ci: break into multiple workflows (#323)
Browse files Browse the repository at this point in the history
* ci: separate into multiple workflows

* ci: run auth workflow if yml changes

* ci: platform in quotes

* ci: typo

* ci: add test plan for all targets

* ci: fix concurrency group

* chore: run all tests
  • Loading branch information
grdsdev authored Apr 3, 2024
1 parent 14e68f2 commit 603db24
Show file tree
Hide file tree
Showing 23 changed files with 601 additions and 129 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/auth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Auth

on:
pull_request:
paths:
- "Sources/Auth/**"
- "Tests/Auth/**"
- ".github/workflows/auth.yml"
push:
branches:
- main
paths:
- "Sources/Auth/**"
- "Tests/Auth/**"
- ".github/workflows/auth.yml"

concurrency:
group: auth-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test Auth
strategy:
fail-fast: false
matrix:
platform:
- macOS
- macOS,variant=Mac Catalyst
- iOS Simulator,name=iPhone 15 Pro
- tvOS Simulator,name=Apple TV
- watchOS Simulator,name=Apple Watch Series 9 (41mm)
- visionOS Simulator,name=Any visionOS Simulator Device
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app
- name: Run tests
run: PLATFORM="${{ matrix.platform }}" SCHEME=Auth make test-library
70 changes: 0 additions & 70 deletions .github/workflows/ci.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/functions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Functions

on:
pull_request:
paths:
- "Sources/Functions/**"
- "Tests/Functions/**"
- ".github/workflows/functions.yml"
push:
branches:
- main
paths:
- "Sources/Functions/**"
- "Tests/Functions/**"
- ".github/workflows/functions.yml"

concurrency:
group: functions-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test Functions
strategy:
fail-fast: false
matrix:
platform:
- macOS
- macOS,variant=Mac Catalyst
- iOS Simulator,name=iPhone 15 Pro
- tvOS Simulator,name=Apple TV
- watchOS Simulator,name=Apple Watch Series 9 (41mm)
- visionOS Simulator,name=Any visionOS Simulator Device
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app
- name: Run tests
run: PLATFORM="${{ matrix.platform }}" SCHEME=Functions make test-library
29 changes: 29 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Integration Tests

on:
push:
branches:
- main
- release/*
workflow_dispatch:

concurrency:
group: integration-tests-${{ github.ref }}
cancel-in-progress: true

jobs:
integration-tests:
runs-on: macos-14
name: Integration Tests
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app
- name: Run tests
run: make test-integration
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
SUPABASE_SERVICE_KEY: ${{ secrets.SUPABASE_SERVICE_KEY }}
42 changes: 42 additions & 0 deletions .github/workflows/postgrest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PostgREST

on:
pull_request:
paths:
- "Sources/PostgREST/**"
- "Tests/PostgREST/**"
- ".github/workflows/postgrest.yml"
push:
branches:
- main
paths:
- "Sources/PostgREST/**"
- "Tests/PostgREST/**"
- ".github/workflows/postgrest.yml"

concurrency:
group: postgrest-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test PostgREST
strategy:
fail-fast: false
matrix:
platform:
- macOS
- macOS,variant=Mac Catalyst
- iOS Simulator,name=iPhone 15 Pro
- tvOS Simulator,name=Apple TV
- watchOS Simulator,name=Apple Watch Series 9 (41mm)
- visionOS Simulator,name=Any visionOS Simulator Device
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app
- name: Run tests
run: PLATFORM="${{ matrix.platform }}" SCHEME=PostgREST make test-library
42 changes: 42 additions & 0 deletions .github/workflows/realtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Realtime

on:
pull_request:
paths:
- "Sources/Realtime/**"
- "Tests/Realtime/**"
- ".github/workflows/realtime.yml"
push:
branches:
- main
paths:
- "Sources/Realtime/**"
- "Tests/Realtime/**"
- ".github/workflows/realtime.yml"

concurrency:
group: realtime-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test Realtime
strategy:
fail-fast: false
matrix:
platform:
- macOS
- macOS,variant=Mac Catalyst
- iOS Simulator,name=iPhone 15 Pro
- tvOS Simulator,name=Apple TV
- watchOS Simulator,name=Apple Watch Series 9 (41mm)
- visionOS Simulator,name=Any visionOS Simulator Device
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app
- name: Run tests
run: PLATFORM="${{ matrix.platform }}" SCHEME=Realtime make test-library
42 changes: 42 additions & 0 deletions .github/workflows/storage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Storage

on:
pull_request:
paths:
- "Sources/Storage/**"
- "Tests/Storage/**"
- ".github/workflows/storage.yml"
push:
branches:
- main
paths:
- "Sources/Storage/**"
- "Tests/Storage/**"
- ".github/workflows/storage.yml"

concurrency:
group: storage-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test Storage
strategy:
fail-fast: false
matrix:
platform:
- macOS
- macOS,variant=Mac Catalyst
- iOS Simulator,name=iPhone 15 Pro
- tvOS Simulator,name=Apple TV
- watchOS Simulator,name=Apple Watch Series 9 (41mm)
- visionOS Simulator,name=Any visionOS Simulator Device
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app
- name: Run tests
run: PLATFORM="${{ matrix.platform }}" SCHEME=Storage make test-library
42 changes: 42 additions & 0 deletions .github/workflows/supabase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Supabase

on:
pull_request:
paths:
- "Sources/Supabase/**"
- "Tests/Supabase/**"
- ".github/workflows/supabase.yml"
push:
branches:
- main
paths:
- "Sources/Supabase/**"
- "Tests/Supabase/**"
- ".github/workflows/supabase.yml"

concurrency:
group: supabase-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test Supabase
strategy:
fail-fast: false
matrix:
platform:
- macOS
- macOS,variant=Mac Catalyst
- iOS Simulator,name=iPhone 15 Pro
- tvOS Simulator,name=Apple TV
- watchOS Simulator,name=Apple Watch Series 9 (41mm)
- visionOS Simulator,name=Any visionOS Simulator Device
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app
- name: Run tests
run: PLATFORM="${{ matrix.platform }}" SCHEME=Supabase make test-library
Loading

0 comments on commit 603db24

Please sign in to comment.