mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-06 14:17:26 +00:00
fix(ci): run pull request validation on hosted runners
This commit is contained in:
@@ -16,10 +16,10 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate:
|
validate:
|
||||||
runs-on: [self-hosted, linux, x64]
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
# Keep Bun cache isolated per job workspace so parallel self-hosted runs
|
# Keep Bun cache isolated per job workspace so parallel CI runs
|
||||||
# do not race on ~/.bun/install/cache and corrupt restore/install state.
|
# do not race on shared cache paths and corrupt restore/install state.
|
||||||
BUN_INSTALL_CACHE_DIR: ${{ github.workspace }}/.bun/install/cache
|
BUN_INSTALL_CACHE_DIR: ${{ github.workspace }}/.bun/install/cache
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
run: ${{ matrix.check.cmd }}
|
run: ${{ matrix.check.cmd }}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: [self-hosted, linux, x64]
|
runs-on: ubuntu-latest
|
||||||
name: build
|
name: build
|
||||||
env:
|
env:
|
||||||
BUN_INSTALL_CACHE_DIR: ${{ github.workspace }}/.bun/install/cache
|
BUN_INSTALL_CACHE_DIR: ${{ github.workspace }}/.bun/install/cache
|
||||||
@@ -98,7 +98,7 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: [self-hosted, linux, x64]
|
runs-on: ubuntu-latest
|
||||||
name: test
|
name: test
|
||||||
needs: [build]
|
needs: [build]
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ describe('pr ci workflow', () => {
|
|||||||
expect(workflow).toContain('group: ci-${{ github.ref }}');
|
expect(workflow).toContain('group: ci-${{ github.ref }}');
|
||||||
expect(workflow).toContain('cancel-in-progress: true');
|
expect(workflow).toContain('cancel-in-progress: true');
|
||||||
expect(workflow).toContain('fail-fast: false');
|
expect(workflow).toContain('fail-fast: false');
|
||||||
expect(workflow).toContain('runs-on: [self-hosted, linux, x64]');
|
expect(workflow.match(/runs-on: ubuntu-latest/g)).toHaveLength(3);
|
||||||
|
expect(workflow).not.toContain('runs-on: [self-hosted, linux, x64]');
|
||||||
expect(workflow).toContain("cmd: 'bun run typecheck'");
|
expect(workflow).toContain("cmd: 'bun run typecheck'");
|
||||||
expect(workflow).toContain("cmd: 'bun run lint'");
|
expect(workflow).toContain("cmd: 'bun run lint'");
|
||||||
expect(workflow).toContain("cmd: 'bun run format:check'");
|
expect(workflow).toContain("cmd: 'bun run format:check'");
|
||||||
|
|||||||
Reference in New Issue
Block a user