Skip to content

Commit 91fa0c1

Browse files
committed
try to fix CI
1 parent e4dc495 commit 91fa0c1

3 files changed

Lines changed: 177 additions & 143 deletions

File tree

.github/workflows/main.yml

Lines changed: 8 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Integration tests
33
on:
44
push:
55
branches: [ "main" ]
6-
pull_request:
6+
pull_request: # TODO: remove
77
branches: [ "main" ]
88
concurrency:
99
group: ${{ github.ref }}
1010
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
1111
jobs:
12-
build-release-app:
12+
warm-up-release-app-cache:
1313
runs-on: macos-15
1414
steps:
1515
- name: MacOS version
@@ -25,144 +25,20 @@ jobs:
2525
with:
2626
xcode-version: latest-stable
2727
- name: Install node dependencies
28-
run: cd local-server && yarn install
28+
run: cd local-server && yarn install && yarn build && yarn copy-to-app
2929
# See https://github.com/actions/runner-images/issues/10722#issuecomment-2387952421
3030
- uses: extractions/netrc@v1
3131
with:
3232
machine: github.com
3333
username: oauth2
3434
password: ${{ secrets.GITHUB_TOKEN }}
35-
- name: Cache derived data
36-
uses: actions/cache@v4
37-
with:
38-
path: app/build/derived_data
39-
key: ${{ runner.os }}-app-derived-data-
40-
restore-keys: |
41-
${{ runner.os }}-app-derived-data-
4235
- name: Make release
4336
run: cd app && fastlane mac build_release
4437
env:
4538
MATCH_PASSWORD: ${{ secrets.FASTLANE_MACH_PASSWORD }}
4639
FASTLANE_MACH_REPO_GITHUB_ACCESS_TOKEN: ${{ secrets.FASTLANE_MACH_REPO_GITHUB_ACCESS_TOKEN }}
47-
48-
# test-swift:
49-
# runs-on: macos-15
50-
# steps:
51-
# - name: MacOS version
52-
# run: sw_vers
53-
# - uses: actions/checkout@v4
54-
# - uses: swift-actions/setup-swift@v2
55-
# with:
56-
# swift-version: "6.1"
57-
# - uses: maxim-lobanov/setup-xcode@v1
58-
# with:
59-
# xcode-version: latest-stable
60-
# - uses: actions/setup-node@v4
61-
# with:
62-
# node-version-file: "./local-server/.nvmrc"
63-
# - name: Install dependencies
64-
# run: cd local-server && yarn install && yarn build && yarn copy-to-app
65-
# - name: Cache SPM .build
66-
# uses: actions/cache@v4
67-
# with:
68-
# path: app/modules/.build
69-
# key: ${{ runner.os }}-spm-app-modules-${{ hashFiles('app/modules/Package.swift') }}
70-
# restore-keys: |
71-
# ${{ runner.os }}-spm-app-modules-
72-
# - name: Run tests
73-
# run: cd app && ./cmd.sh test:swift
74-
75-
# lint-swift:
76-
# runs-on: macos-15
77-
# steps:
78-
# - name: MacOS version
79-
# run: sw_vers
80-
# - uses: actions/checkout@v4
81-
# - name: Set up Homebrew
82-
# id: set-up-homebrew
83-
# uses: Homebrew/actions/setup-homebrew@master
84-
# - name: Install swiftformat
85-
# run: brew install swiftformat
86-
# - name: Run linter
87-
# run: cd app && ./cmd.sh lint:swift
88-
# - name: Verify that `cmd lint:swift` did not change outputs (if it did, please re-run it and re-commit!)
89-
# run: git diff --exit-code
90-
91-
# sync-app-dependencies:
92-
# runs-on: macos-15
93-
# steps:
94-
# - name: MacOS version
95-
# run: sw_vers
96-
# - uses: actions/checkout@v4
97-
# - uses: swift-actions/setup-swift@v2
98-
# with:
99-
# swift-version: "6.1"
100-
# - name: Set up Homebrew
101-
# id: set-up-homebrew
102-
# uses: Homebrew/actions/setup-homebrew@master
103-
# - name: Install swiftformat
104-
# run: brew install swiftformat
105-
# - name: Run sync dependencies
106-
# run: cd app && ./cmd.sh sync:dependencies
107-
# - name: Verify that `cmd sync:dependencies` did not change outputs (if it did, please re-run it and re-commit!)
108-
# run: git diff --exit-code
109-
110-
# test-node:
111-
# runs-on: macos-15
112-
# steps:
113-
# - name: MacOS version
114-
# run: sw_vers
115-
# - uses: actions/checkout@v4
116-
# - uses: actions/setup-node@v4
117-
# with:
118-
# node-version-file: "./local-server/.nvmrc"
119-
# - name: Install dependencies
120-
# run: cd local-server && yarn install
121-
# - name: Run tests
122-
# run: cd local-server && yarn test
123-
124-
# tsc:
125-
# runs-on: macos-15
126-
# steps:
127-
# - name: MacOS version
128-
# run: sw_vers
129-
# - uses: actions/checkout@v4
130-
# - uses: actions/setup-node@v4
131-
# with:
132-
# node-version-file: "./local-server/.nvmrc"
133-
# - name: Install dependencies
134-
# run: cd local-server && yarn install
135-
# - name: Run tests
136-
# run: cd local-server && yarn tsc
137-
138-
# lint-node:
139-
# runs-on: macos-15
140-
# steps:
141-
# - name: MacOS version
142-
# run: sw_vers
143-
# - uses: actions/checkout@v4
144-
# - uses: actions/setup-node@v4
145-
# with:
146-
# node-version-file: "./local-server/.nvmrc"
147-
# - name: Install dependencies
148-
# run: cd local-server && yarn install
149-
# - name: Run linter
150-
# run: cd local-server && yarn lint:fix
151-
# - name: Verify that `yarn lint:fix` did not change outputs (if it did, please re-run it and re-commit!)
152-
# run: git diff --exit-code
153-
154-
# lint-shell:
155-
# runs-on: macos-15
156-
# steps:
157-
# - name: MacOS version
158-
# run: sw_vers
159-
# - uses: actions/checkout@v4
160-
# - name: Set up Homebrew
161-
# id: set-up-homebrew
162-
# uses: Homebrew/actions/setup-homebrew@master
163-
# - name: Install shfmt
164-
# run: brew install shfmt
165-
# - name: Run linter
166-
# run: shfmt -w ./**/*.sh
167-
# - name: Verify that `shfmt -w ./**/*.sh` did not change outputs (if it did, please re-run it and re-commit!)
168-
# run: git diff --exit-code
40+
- name: Cache derived data
41+
uses: actions/cache/save@v4
42+
with:
43+
path: app/build/derived_data
44+
key: ${{ runner.os }}-app-derived-data-main

.github/workflows/pr.yml

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
name: Integration tests
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
concurrency:
7+
group: ${{ github.ref }}
8+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
9+
jobs:
10+
build-release-app:
11+
runs-on: macos-15
12+
steps:
13+
- name: MacOS version
14+
run: sw_vers
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version-file: "./local-server/.nvmrc"
19+
- uses: swift-actions/setup-swift@v2
20+
with:
21+
swift-version: "6.1"
22+
- uses: maxim-lobanov/setup-xcode@v1
23+
with:
24+
xcode-version: latest-stable
25+
- name: Install node dependencies
26+
run: cd local-server && yarn install && yarn build && yarn copy-to-app
27+
# See https://github.com/actions/runner-images/issues/10722#issuecomment-2387952421
28+
- uses: extractions/netrc@v1
29+
with:
30+
machine: github.com
31+
username: oauth2
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
- name: Load derived data cache
34+
uses: actions/cache/restore@v4
35+
with:
36+
path: app/build/derived_data
37+
key: ${{ runner.os }}-app-derived-data-main
38+
- name: Build app in Release mode
39+
run: cd app && fastlane mac build_release
40+
env:
41+
MATCH_PASSWORD: ${{ secrets.FASTLANE_MACH_PASSWORD }}
42+
FASTLANE_MACH_REPO_GITHUB_ACCESS_TOKEN: ${{ secrets.FASTLANE_MACH_REPO_GITHUB_ACCESS_TOKEN }}
43+
44+
# test-swift:
45+
# runs-on: macos-15
46+
# steps:
47+
# - name: MacOS version
48+
# run: sw_vers
49+
# - uses: actions/checkout@v4
50+
# - uses: swift-actions/setup-swift@v2
51+
# with:
52+
# swift-version: "6.1"
53+
# - uses: maxim-lobanov/setup-xcode@v1
54+
# with:
55+
# xcode-version: latest-stable
56+
# - uses: actions/setup-node@v4
57+
# with:
58+
# node-version-file: "./local-server/.nvmrc"
59+
# - name: Install dependencies
60+
# run: cd local-server && yarn install && yarn build && yarn copy-to-app
61+
# - name: Cache SPM .build
62+
# uses: actions/cache@v4
63+
# with:
64+
# path: app/modules/.build
65+
# key: ${{ runner.os }}-spm-app-modules-${{ hashFiles('app/modules/Package.swift') }}
66+
# restore-keys: |
67+
# ${{ runner.os }}-spm-app-modules-
68+
# - name: Run tests
69+
# run: cd app && ./cmd.sh test:swift
70+
71+
# lint-swift:
72+
# runs-on: macos-15
73+
# steps:
74+
# - name: MacOS version
75+
# run: sw_vers
76+
# - uses: actions/checkout@v4
77+
# - name: Set up Homebrew
78+
# id: set-up-homebrew
79+
# uses: Homebrew/actions/setup-homebrew@master
80+
# - name: Install swiftformat
81+
# run: brew install swiftformat
82+
# - name: Run linter
83+
# run: cd app && ./cmd.sh lint:swift
84+
# - name: Verify that `cmd lint:swift` did not change outputs (if it did, please re-run it and re-commit!)
85+
# run: git diff --exit-code
86+
87+
# sync-app-dependencies:
88+
# runs-on: macos-15
89+
# steps:
90+
# - name: MacOS version
91+
# run: sw_vers
92+
# - uses: actions/checkout@v4
93+
# - uses: swift-actions/setup-swift@v2
94+
# with:
95+
# swift-version: "6.1"
96+
# - name: Set up Homebrew
97+
# id: set-up-homebrew
98+
# uses: Homebrew/actions/setup-homebrew@master
99+
# - name: Install swiftformat
100+
# run: brew install swiftformat
101+
# - name: Run sync dependencies
102+
# run: cd app && ./cmd.sh sync:dependencies
103+
# - name: Verify that `cmd sync:dependencies` did not change outputs (if it did, please re-run it and re-commit!)
104+
# run: git diff --exit-code
105+
106+
# test-node:
107+
# runs-on: macos-15
108+
# steps:
109+
# - name: MacOS version
110+
# run: sw_vers
111+
# - uses: actions/checkout@v4
112+
# - uses: actions/setup-node@v4
113+
# with:
114+
# node-version-file: "./local-server/.nvmrc"
115+
# - name: Install dependencies
116+
# run: cd local-server && yarn install
117+
# - name: Run tests
118+
# run: cd local-server && yarn test
119+
120+
# tsc:
121+
# runs-on: macos-15
122+
# steps:
123+
# - name: MacOS version
124+
# run: sw_vers
125+
# - uses: actions/checkout@v4
126+
# - uses: actions/setup-node@v4
127+
# with:
128+
# node-version-file: "./local-server/.nvmrc"
129+
# - name: Install dependencies
130+
# run: cd local-server && yarn install
131+
# - name: Run tests
132+
# run: cd local-server && yarn tsc
133+
134+
# lint-node:
135+
# runs-on: macos-15
136+
# steps:
137+
# - name: MacOS version
138+
# run: sw_vers
139+
# - uses: actions/checkout@v4
140+
# - uses: actions/setup-node@v4
141+
# with:
142+
# node-version-file: "./local-server/.nvmrc"
143+
# - name: Install dependencies
144+
# run: cd local-server && yarn install
145+
# - name: Run linter
146+
# run: cd local-server && yarn lint:fix
147+
# - name: Verify that `yarn lint:fix` did not change outputs (if it did, please re-run it and re-commit!)
148+
# run: git diff --exit-code
149+
150+
# lint-shell:
151+
# runs-on: macos-15
152+
# steps:
153+
# - name: MacOS version
154+
# run: sw_vers
155+
# - uses: actions/checkout@v4
156+
# - name: Set up Homebrew
157+
# id: set-up-homebrew
158+
# uses: Homebrew/actions/setup-homebrew@master
159+
# - name: Install shfmt
160+
# run: brew install shfmt
161+
# - name: Run linter
162+
# run: shfmt -w ./**/*.sh
163+
# - name: Verify that `shfmt -w ./**/*.sh` did not change outputs (if it did, please re-run it and re-commit!)
164+
# run: git diff --exit-code

.github/workflows/release.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: Release MacOS app
22

3-
# on:
4-
# pull_request: # TODO: Remove
5-
# branches: [ "main" ]
3+
on:
4+
pull_request: # TODO: Remove
5+
branches: [ "main" ]
66
concurrency:
77
group: ${{ github.ref }}
8-
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
98
jobs:
109
distribute-app:
1110
runs-on: macos-15
@@ -23,19 +22,14 @@ jobs:
2322
with:
2423
xcode-version: latest-stable
2524
- name: Install node dependencies
26-
run: cd local-server && yarn install
25+
run: cd local-server && yarn install && yarn build && yarn copy-to-app
2726
# See https://github.com/actions/runner-images/issues/10722#issuecomment-2387952421
2827
- uses: extractions/netrc@v1
2928
with:
3029
machine: github.com
3130
username: oauth2
3231
password: ${{ secrets.GITHUB_TOKEN }}
33-
- uses: extractions/netrc@v1
34-
with:
35-
machine: api.github.com
36-
username: oauth2
37-
password: ${{ secrets.GITHUB_TOKEN }}
38-
- name: Make release
32+
- name: Publish release
3933
run: cd app && fastlane mac distribute_release
4034
env:
4135
FASTLANE_MACH_REPO_GITHUB_ACCESS_TOKEN: ${{ secrets.FASTLANE_MACH_REPO_GITHUB_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)