Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run pr checks on mac #167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
38 changes: 7 additions & 31 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,12 @@ on:

workflow_dispatch:

concurrency:
group: pr-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
TILT_VERSION: 'v0.33.21'

jobs:
tests:
checks-ubuntu:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Tilt
run: curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/${TILT_VERSION}/scripts/install.sh | bash

- name: Setup pnpm
uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm

- name: Run npm install
run: pnpm install --frozen-lockfile

- name: Eslint
run: pnpm run lint

- name: Run Tests
run: pnpm run tilt:ci
strategy:
matrix:
runner: [ubuntu-latest, macos-latest]
uses: ./.github/workflows/reusable-pr.yaml
with:
runner: ${{ matrix.runner }}
42 changes: 42 additions & 0 deletions .github/workflows/reusable-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: checks

on:
workflow_call:
inputs:
runner:
required: true
type: string

concurrency:
group: pr-${{ inputs.runner }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
TILT_VERSION: 'v0.33.21'

jobs:
tests:
name: Tests - ${{ inputs.runner }}
runs-on: ${{ inputs.runner }}
steps:
- uses: actions/checkout@v4

- name: Setup Tilt
run: curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/${TILT_VERSION}/scripts/install.sh | bash

- name: Setup pnpm
uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm

- name: Run npm install
run: pnpm install --frozen-lockfile

- name: Eslint
run: pnpm run lint

- name: Run Tests
run: DOCKER_HOST="$(docker context inspect colima -f '{{ .Endpoints.docker.Host }}')" pnpm run tilt:ci
Loading