Ensure that failing tests prevent PRs from being merged. (#50)

This commit is contained in:
Predrag Gruevski 2023-06-06 14:59:32 -04:00 committed by GitHub
parent 06053f9c6c
commit 49c4f979e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 2 deletions

View file

@ -10,6 +10,37 @@ env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
jobs: 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: test-build:
name: Test build name: Test build
uses: ./.github/workflows/test-build.yml uses: ./.github/workflows/test-build.yml

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View file

@ -37,7 +37,7 @@ function getFeatureGroup(name = ""): string[] {
case "only-explicit-features": case "only-explicit-features":
return ["--only-explicit-features"]; return ["--only-explicit-features"];
case "": case "":
return [""]; return [];
default: default:
throw new Error(`Unsupported feature group: ${name}`); throw new Error(`Unsupported feature group: ${name}`);
} }