File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI - Build & Test (Tuist)
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ - develop
8+ workflow_dispatch :
9+
10+ jobs :
11+ build-and-test :
12+ runs-on : macos-latest
13+
14+ steps :
15+ - name : Checkout Repo
16+ uses : actions/checkout@v4
17+
18+ - name : Setup mise & install Tuist
19+ uses : jdx/mise-action@v2
20+
21+ - name : Extract Tuist version from mise.toml
22+ id : get-tuist-version
23+ run : |
24+ TUIST_VERSION=$(grep '^tuist' mise.toml | sed 's/.*= "\(.*\)"/\1/')
25+ echo "TUIST_VERSION=$TUIST_VERSION" >> $GITHUB_ENV
26+
27+ - name : Cache Tuist
28+ uses : actions/cache@v4
29+ id : cache-tuist
30+ with :
31+ path : ~/.local/share/mise/installs/tuist/${{ env.TUIST_VERSION }}
32+ key : tuist-${{ runner.os }}-${{ env.TUIST_VERSION }}
33+
34+ - name : Install Tuist (if not cached)
35+ if : steps.cache-tuist.outputs.cache-hit != 'true'
36+ run : mise install tuist@${{ env.TUIST_VERSION }}
37+
38+ - name : Activate Tuist
39+ run : |
40+ mise use -g tuist@${{ env.TUIST_VERSION }}
41+ tuist --version
42+
43+ - name : Detect Tuist Project Directory
44+ id : detect-tuist-dir
45+ run : |
46+ echo "Searching for Project.swift..."
47+ TUIST_DIR=$(find . -name "Project.swift" -exec dirname {} \; | head -n 1)
48+ echo "Found Tuist directory: $TUIST_DIR"
49+ echo "tuist_path=$TUIST_DIR" >> $GITHUB_OUTPUT
50+
51+ - name : Install Dependencies with Tuist
52+ working-directory : ${{ steps.detect-tuist-dir.outputs.tuist_path }}
53+ run : |
54+ tuist install
55+
56+ - name : Run Tests
57+ working-directory : ${{ steps.detect-tuist-dir.outputs.tuist_path }}
58+ run : |
59+ tuist build
You can’t perform that action at this time.
0 commit comments