Skip to content

Merge pull request #243 from Team-Ampersand/242-add-privacy-manifest #404

Merge pull request #243 from Team-Ampersand/242-add-privacy-manifest

Merge pull request #243 from Team-Ampersand/242-add-privacy-manifest #404

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "*" ]
env:
CACHED_DEPENDENCY_PATHS: ${{ github.workspace }}/Tuist/Dependencies
DOTORI_IOS_DISCORD_WEBHOOK: ${{ secrets.DOTORI_IOS_DISCORD_WEBHOOK }}
DOTORI_IOS_ROLE: ${{ secrets.DOTORI_IOS_ROLE }}
MASTER_KEY_SECRET: ${{ secrets.MASTER_KEY_SECRET }}
ENCRYPTED_MASTER_KEY_PATH: ${{ 'Tuist/master.key.gpg' }}
DECRYPTED_MASTER_KEY_PATH: ${{ 'Tuist/master.key' }}
jobs:
prepare-dependency:
name: ⚙️ Prepare for CI
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- uses: jdx/mise-action@v2
with:
xcode-version: 15.2
- name: Install tuist
run: mise install tuist
- name: Compute dependency cache key
id: compute_hash
run: echo "hash=${{ hashFiles('Tuist/Package.swift') }}" >> $GITHUB_OUTPUT
- name: Check dependency cache
uses: actions/cache@v3
id: cache_dependencies
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ steps.compute_hash.outputs.hash }}
- name: Install dependencies
if: steps.cache_dependencies.outputs.cache-hit == ''
run: tuist install
outputs:
dependency_cache_key: ${{ steps.compute_hash.outputs.hash }}
test:
name: 🧪 Test
runs-on: macos-14
needs: prepare-dependency
steps:
- uses: actions/checkout@v2
with:
xcode-version: 15.2
- uses: jdx/mise-action@v2
- name: Install tuist
run: mise install tuist
- name: Check dependency cache
uses: actions/cache@v3
id: cache_dependencies
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.prepare-dependency.outputs.dependency_cache_key }}
- name: Decode master.key
run: gpg -d -o "$DECRYPTED_MASTER_KEY_PATH" --pinentry-mode=loopback --passphrase "$MASTER_KEY_SECRET" "$ENCRYPTED_MASTER_KEY_PATH"
- name: Install dependencies
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: tuist install
- name: Test with tuist
run: TUIST_ENV=CI tuist test --no-selective-testing
- name: Dotori iOS Test Success Discord Notification
uses: sarisia/actions-status-discord@v1
if: ${{ success() }}
with:
title: "✅ 도토리 iOS Test Success !"
description: "Success to test 🧩"
webhook: ${{ env.DOTORI_IOS_DISCORD_WEBHOOK }}
color: 0x43962A
- name: Dotori iOS Test Failed Discord Notification
uses: sarisia/actions-status-discord@v1
if: ${{ failure() }}
with:
title: "❌ 도토리 iOS Test Failed .."
content: "<@${{ env.DOTORI_IOS_ROLE }}>"
description: "Failed to test 🥺"
webhook: ${{ env.DOTORI_IOS_DISCORD_WEBHOOK }}
color: 0xBB3639