Skip to content

Commit 8ff6d15

Browse files
committed
ci: run pr checks on mac
1 parent 9d3d5b0 commit 8ff6d15

File tree

2 files changed

+66
-36
lines changed

2 files changed

+66
-36
lines changed

.github/workflows/pr.yaml

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,12 @@ on:
77

88
workflow_dispatch:
99

10-
concurrency:
11-
group: pr-${{ github.head_ref || github.run_id }}
12-
cancel-in-progress: true
13-
14-
env:
15-
TILT_VERSION: '0.33.21'
16-
1710
jobs:
18-
tests:
19-
name: Tests
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v4
23-
24-
- name: Setup Tilt
25-
uses: yokawasa/[email protected]
26-
with:
27-
setup-tools: |
28-
tilt
29-
tilt: ${{ env.TILT_VERSION }}
30-
31-
- name: Setup pnpm
32-
uses: pnpm/action-setup@v4
33-
34-
- uses: actions/setup-node@v4
35-
with:
36-
node-version-file: .nvmrc
37-
cache: pnpm
38-
39-
- name: Run npm install
40-
run: pnpm install --frozen-lockfile
41-
42-
- name: Eslint
43-
run: pnpm run lint
44-
45-
- name: Run Tests
46-
run: pnpm run tilt:ci
11+
checks-ubuntu:
12+
uses: ./.github/workflows/reusable-pr.yaml
13+
with:
14+
runner: ubuntu-latest
15+
checks-macos:
16+
uses: ./.github/workflows/reusable-pr.yaml
17+
with:
18+
runner: macos-latest

.github/workflows/reusable-pr.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: checks
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
runner:
7+
required: true
8+
type: string
9+
10+
concurrency:
11+
group: pr-${{ inputs.runner }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
env:
15+
TILT_VERSION: '0.33.21'
16+
17+
jobs:
18+
tests:
19+
name: Tests
20+
runs-on: ${{ inputs.runner }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup Tilt
25+
if: ${{ inputs.runner == 'ubuntu-latest' }}
26+
uses: yokawasa/[email protected]
27+
with:
28+
setup-tools: |
29+
tilt
30+
tilt: ${{ env.TILT_VERSION }}
31+
32+
- name: Set up Homebrew
33+
if: ${{ inputs.runner == 'macos-latest' }}
34+
uses: Homebrew/actions/setup-homebrew@master
35+
36+
- name: Install Tilt
37+
if: ${{ inputs.runner == 'macos-latest' }}
38+
run: |
39+
brew install docker colima tilt
40+
start colima
41+
docker run hello-world
42+
43+
- name: Setup pnpm
44+
uses: pnpm/action-setup@v4
45+
46+
- uses: actions/setup-node@v4
47+
with:
48+
node-version-file: .nvmrc
49+
cache: pnpm
50+
51+
- name: Run npm install
52+
run: pnpm install --frozen-lockfile
53+
54+
- name: Eslint
55+
run: pnpm run lint
56+
57+
- name: Run Tests
58+
run: DOCKER_HOST="$(docker context inspect colima -f '{{ .Endpoints.docker.Host }}')" pnpm run tilt:ci

0 commit comments

Comments
 (0)