37 lines
772 B
YAML
37 lines
772 B
YAML
name: Test action
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
|
|
jobs:
|
|
test-valid:
|
|
runs-on: stackit-docker
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Test valid commit
|
|
uses: ./
|
|
with:
|
|
value: "feat(core): add new validation"
|
|
|
|
test-invalid:
|
|
runs-on: stackit-docker
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Test invalid commit
|
|
id: test-fail
|
|
continue-on-error: true
|
|
uses: ./
|
|
with:
|
|
value: "Added new validation"
|
|
- name: Check if test failed
|
|
if: steps.test-fail.outcome == 'success'
|
|
run: |
|
|
echo "The test should have failed but it succeeded."
|
|
exit 1
|