mirror of
https://github.com/obi1kenobi/cargo-semver-checks-action.git
synced 2024-11-21 23:49:33 +01:00
Ensure that failing tests prevent PRs from being merged. (#50)
This commit is contained in:
parent
06053f9c6c
commit
49c4f979e7
3 changed files with 33 additions and 2 deletions
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
|
@ -10,6 +10,37 @@ env:
|
|||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
ci-everything:
|
||||
name: All CI stages
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- test-build
|
||||
- test-action
|
||||
- test-inputs
|
||||
- test-cache
|
||||
if: ${{ success() || failure() }} # Run this job even if a dependency has failed.
|
||||
steps:
|
||||
- name: Job outcomes
|
||||
run: |
|
||||
echo "test-build: ${{ needs.test-build.result }}"
|
||||
echo "test-action: ${{ needs.test-action.result }}"
|
||||
echo "test-inputs: ${{ needs.test-inputs.result }}"
|
||||
echo "test-cache: ${{ needs.test-cache.result }}"
|
||||
|
||||
# Fail this required job if any of its dependent jobs have failed.
|
||||
#
|
||||
# Do not attempt to consolidate these steps into one step, it won't work.
|
||||
# Multi-line `if` clauses are not evaluated properly: see the intermediate commits in
|
||||
# https://github.com/obi1kenobi/cargo-semver-checks/pull/405
|
||||
- if: ${{ needs.test-build.result != 'success' }}
|
||||
run: exit 1
|
||||
- if: ${{ needs.test-action.result != 'success' }}
|
||||
run: exit 1
|
||||
- if: ${{ needs.test-inputs.result != 'success' }}
|
||||
run: exit 1
|
||||
- if: ${{ needs.test-cache.result != 'success' }}
|
||||
run: exit 1
|
||||
|
||||
test-build:
|
||||
name: Test build
|
||||
uses: ./.github/workflows/test-build.yml
|
||||
|
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -37,7 +37,7 @@ function getFeatureGroup(name = ""): string[] {
|
|||
case "only-explicit-features":
|
||||
return ["--only-explicit-features"];
|
||||
case "":
|
||||
return [""];
|
||||
return [];
|
||||
default:
|
||||
throw new Error(`Unsupported feature group: ${name}`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue