Skip to content

Commit

Permalink
chore(CI): swift CI
Browse files Browse the repository at this point in the history
  • Loading branch information
krystxf committed May 15, 2024
1 parent e8165cf commit 0fd9530
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 13 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/app-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: App CI

on:
push:
paths:
- "app/**"
branches:
- main
pull_request:
types: [opened, synchronize, ready_for_review]
branches:
- main

jobs:
ci:
name: App CI 🚀
runs-on: macos-latest
steps:
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf
with:
swift-version: 5.10
- uses: actions/checkout@v4

- name: Unit tests
run: |
cd ./app/metro-now
xcodebuild test -scheme metro-now -project metro-now.xcodeproj -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5' | xcpretty && exit ${PIPESTATUS[0]}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Backend
name: Backend CI

on: push

jobs:
backend-ci:
name: CI
build:
name: Build 🏗️
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
Expand All @@ -20,7 +20,8 @@ jobs:
bun run build
publish-docker-image:
needs: backend-ci
name: Publish Docker image 🚀
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/check-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Check format

on: push

jobs:
swift-format-check:
name: Swift format check 💅
runs-on: macos-latest

steps:
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf
with:
swift-version: 5.10
- uses: actions/checkout@v4

- name: Check Swift format
run: swiftformat . --lint

js-format-check:
name: JS format check 💅
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Check format
run: |
pnpm install
pnpm run check:format
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml → .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: CI
name: Docs CI

on: push

jobs:
frontend-ci:
docs-ci:
name: Docs CI 📖
runs-on: ubuntu-latest

steps:
Expand All @@ -18,18 +19,14 @@ jobs:
with:
version: 8

- name: Check format
run: |
pnpm install
pnpm run check:format
- name: Frontend lint
- name: Lint 🔍
continue-on-error: true
run: |
cd ./frontend
pnpm install
pnpm run lint
- name: Frontend build
- name: Build 👷‍♂️
run: |
cd ./frontend
pnpm install
Expand Down

0 comments on commit 0fd9530

Please sign in to comment.