feat(ci): enhance CI workflow with granular steps and error handling
- Add separate steps for formatting, linting, testing, and benchmarking - Introduce failure detection to halt workflow on step failure - Improve maintainability and visibility of CI process outcomes
This commit is contained in:
@@ -17,14 +17,36 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Deno
|
- uses: denoland/setup-deno@v1
|
||||||
uses: denoland/setup-deno@v1
|
|
||||||
with:
|
with:
|
||||||
deno-version: v2.x
|
deno-version: v2.x
|
||||||
|
|
||||||
- name: Run CI Checks
|
- name: Format
|
||||||
|
id: format
|
||||||
|
continue-on-error: true
|
||||||
|
run: deno task fmt
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
id: lint
|
||||||
|
continue-on-error: true
|
||||||
|
run: deno task lint
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
id: test
|
||||||
|
continue-on-error: true
|
||||||
|
run: deno task test
|
||||||
|
|
||||||
|
- name: Benchmark
|
||||||
|
id: benchmark
|
||||||
|
continue-on-error: true
|
||||||
|
run: deno task benchmark
|
||||||
|
|
||||||
|
- name: Fail if any step failed
|
||||||
|
if: |
|
||||||
|
steps.format.outcome != 'success' ||
|
||||||
|
steps.lint.outcome != 'success' ||
|
||||||
|
steps.test.outcome != 'success' ||
|
||||||
|
steps.benchmark.outcome != 'success'
|
||||||
run: |
|
run: |
|
||||||
deno task fmt
|
echo "::error::One or more steps failed"
|
||||||
deno task lint
|
exit 1
|
||||||
deno task test
|
|
||||||
deno task benchmark
|
|
||||||
|
Reference in New Issue
Block a user