54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
|
---
|
||
|
name: pull-requests-open
|
||
|
on:
|
||
|
pull_request:
|
||
|
types:
|
||
|
- opened
|
||
|
- edited
|
||
|
- synchronize
|
||
|
branches:
|
||
|
- main
|
||
|
- develop
|
||
|
|
||
|
jobs:
|
||
|
commit-history-check:
|
||
|
name: Check commit compliance
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v4
|
||
|
with:
|
||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||
|
fetch-depth: 0
|
||
|
|
||
|
- name: Install commitizen
|
||
|
run: pip3 install commitizen
|
||
|
shell: bash
|
||
|
working-directory: ${{ gitea.workspace }}
|
||
|
|
||
|
- name: Verify commit message compliance
|
||
|
run: |
|
||
|
echo "cz check --rev-range origin/${{ gitea.event.pull_request.base.ref }}.."
|
||
|
cz check --rev-range origin/${{ gitea.event.pull_request.base.ref }}..
|
||
|
shell: bash
|
||
|
working-directory: ${{ gitea.workspace }}
|
||
|
|
||
|
run-tests:
|
||
|
name: Run tests
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v4
|
||
|
|
||
|
- name: Install requirements
|
||
|
run: pip3 install -r tests/requirements.txt
|
||
|
shell: bash
|
||
|
working-directory: ${{ gitea.workspace }}
|
||
|
|
||
|
- name: Run ansible unit tests
|
||
|
uses: ansible-community/ansible-test-gh-action@release/v1
|
||
|
with:
|
||
|
ansible-core-version: v2.17.4
|
||
|
testing-type: units
|
||
|
collection-src-directory: ${{ gitea.workspace }}
|