Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/companion-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Companion Lint

on:
workflow_call:

permissions:
contents: read

jobs:
lint:
name: Lint Companion App
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: .github
- uses: ./.github/actions/cache-checkout

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.3.0
cache: false

- name: Install dependencies
working-directory: companion
run: bun install --frozen-lockfile

- name: Run lint
working-directory: companion
run: bun run lint:all
34 changes: 34 additions & 0 deletions .github/workflows/companion-typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Companion Type Check

on:
workflow_call:

permissions:
contents: read

jobs:
typecheck:
name: Type Check Companion App
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: .github
- uses: ./.github/actions/cache-checkout

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.3.0
cache: true
cache-dependency-path: companion/bun.lock

- name: Install dependencies
working-directory: companion
run: bun install --frozen-lockfile

- name: Type check
working-directory: companion
run: bun run typecheck:all
22 changes: 21 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,20 @@ jobs:
uses: ./.github/workflows/companion-build.yml
secrets: inherit

typecheck-companion:
name: Companion type check
needs: [prepare]
if: needs.prepare.outputs.has-companion == 'true'
uses: ./.github/workflows/companion-typecheck.yml
secrets: inherit

lint-companion:
name: Companion lint
needs: [prepare]
if: needs.prepare.outputs.has-companion == 'true'
uses: ./.github/workflows/companion-lint.yml
secrets: inherit

build:
name: Production builds
needs: [prepare]
Expand Down Expand Up @@ -457,6 +471,8 @@ jobs:
build-atoms,
build-docs,
build-companion,
typecheck-companion,
lint-companion,
setup-db,
e2e,
e2e-api-v2,
Expand Down Expand Up @@ -506,5 +522,9 @@ jobs:
) ||
(
needs.prepare.outputs.has-companion == 'true' &&
needs.build-companion.result != 'success'
(
needs.build-companion.result != 'success' ||
needs.typecheck-companion.result != 'success' ||
needs.lint-companion.result != 'success'
)
)
Loading