mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-16 09:46:43 +00:00
Separate CI docker and k8s tests (#250)
* Separate tests * Update .github/workflows/build.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
47
.github/workflows/build.yaml
vendored
47
.github/workflows/build.yaml
vendored
@@ -6,9 +6,45 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
format-and-lint:
|
||||||
|
name: Format & Lint Checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: npm install
|
||||||
|
name: Install dependencies
|
||||||
|
- run: npm run bootstrap
|
||||||
|
name: Bootstrap the packages
|
||||||
|
- run: npm run build-all
|
||||||
|
name: Build packages
|
||||||
|
- run: npm run format-check
|
||||||
|
name: Check formatting
|
||||||
|
- name: Check linter
|
||||||
|
run: |
|
||||||
|
npm run lint
|
||||||
|
git diff --exit-code -- . ':!packages/k8s/tests/test-kind.yaml'
|
||||||
|
|
||||||
|
docker-tests:
|
||||||
|
name: Docker Hook Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: format-and-lint
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: npm install
|
||||||
|
name: Install dependencies
|
||||||
|
- run: npm run bootstrap
|
||||||
|
name: Bootstrap the packages
|
||||||
|
- run: npm run build-all
|
||||||
|
name: Build packages
|
||||||
|
- name: Run Docker tests
|
||||||
|
run: npm run test --prefix packages/docker
|
||||||
|
|
||||||
|
k8s-tests:
|
||||||
|
name: Kubernetes Hook Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: format-and-lint
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: sed -i "s|{{PATHTOREPO}}|$(pwd)|" packages/k8s/tests/test-kind.yaml
|
- run: sed -i "s|{{PATHTOREPO}}|$(pwd)|" packages/k8s/tests/test-kind.yaml
|
||||||
@@ -22,10 +58,5 @@ jobs:
|
|||||||
name: Bootstrap the packages
|
name: Bootstrap the packages
|
||||||
- run: npm run build-all
|
- run: npm run build-all
|
||||||
name: Build packages
|
name: Build packages
|
||||||
- run: npm run format-check
|
- name: Run Kubernetes tests
|
||||||
- name: Check linter
|
run: npm run test --prefix packages/k8s
|
||||||
run: |
|
|
||||||
npm run lint
|
|
||||||
git diff --exit-code -- ':!packages/k8s/tests/test-kind.yaml'
|
|
||||||
- name: Run tests
|
|
||||||
run: npm run test
|
|
||||||
Reference in New Issue
Block a user