Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Walker-GM committed Sep 15, 2024
1 parent 1c0e073 commit b436d76
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 43 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: ${{ inputs.target }} / node 20 latest

on:
workflow_call:
inputs:
target:
description: The target to run on.
type: string
required: true
skip:
description: Whether to skip all jobs.
type: boolean
required: false
default: false

jobs:
build-lint-test:
name: ${{ inputs.target }} / node 20 latest
runs-on: ${{ inputs.target }}
if: ${{ !inputs.skip }}

steps:
- name: Remove the tsc problem matcher if not ubuntu-latest
if: inputs.target != 'ubuntu-latest'
run: echo "echo "::remove-matcher owner=tsc::""

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up job
uses: ./.github/actions/set-up-job

- name: πŸ”Ž Lint
run: yarn lint

# TODO(jgmw): Re-enable when it doesn't hang
# - name: πŸ₯‘ Check packaging and attw
# run: yarn check:package

- name: 🌑 Test Types
run: yarn test:types

- name: Get number of CPU cores
if: always()
id: cpu-cores
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2

- name: πŸ§ͺ Test
run: yarn test-ci --minWorkers=1 --maxWorkers=${{ steps.cpu-cores.outputs.count }}

skipped:
name: Skip / ${{ inputs.target }} / node 20 latest
runs-on: ubuntu-latest
if: ${{ inputs.skip }}
steps:
- name: Skip
run: echo "Skipping as requested from caller"
49 changes: 6 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,55 +87,18 @@ jobs:
run: yarn format:check

build-lint-test:
needs: check

strategy:
matrix:
os: [ubuntu-latest, windows-latest]

name: πŸ— Build, lint, test / ${{ matrix.os }} / node 20 latest
runs-on: ${{ matrix.os }}

steps:
- name: Remove the tsc problem matcher if not ubuntu-latest
if: matrix.os != 'ubuntu-latest'
run: echo "echo "::remove-matcher owner=tsc::""

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up job
uses: ./.github/actions/set-up-job

- name: πŸ”Ž Lint
run: yarn lint

# TODO(jgmw): Re-enable when it doesn't hang
# - name: πŸ₯‘ Check packaging and attw
# run: yarn check:package

- name: 🌑 Test Types
run: yarn test:types

- name: Get number of CPU cores
if: always()
id: cpu-cores
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2

- name: πŸ§ͺ Test
run: yarn test-ci --minWorkers=1 --maxWorkers=${{ steps.cpu-cores.outputs.count }}

build-lint-test-skip:
needs: detect-changes
if: needs.detect-changes.outputs.code == 'false'
needs: [check, detect-changes]

strategy:
matrix:
os: [ubuntu-latest, windows-latest]

name: πŸ— Build, lint, test / ${{ matrix.os }} / node 20 latest
runs-on: ${{ matrix.os }}
name: πŸ— Build, lint, test

steps:
- run: echo "Skipped"
uses: ./.github/workflows/build-lint-test.yml
with:
target: ${{ matrix.os }}
skip: ${{ needs.detect-changes.outputs.code == 'false' }}

tutorial-e2e:
needs: check
Expand Down

0 comments on commit b436d76

Please sign in to comment.