ci: add static+dynamic analysis steps on push
This commit is contained in:
parent
21962ef589
commit
e55dbbced1
2 changed files with 37 additions and 0 deletions
36
.forgejo/workflows/ci.yml
Normal file
36
.forgejo/workflows/ci.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
static-analysis:
|
||||
name: Static analysis
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Yaml formatting
|
||||
id: yaml-format
|
||||
run: pipx run yamllint .
|
||||
continue-on-error: true
|
||||
- name: Python formatting
|
||||
id: python-format
|
||||
run: pipx run black . --check
|
||||
continue-on-error: true
|
||||
- name: Job status
|
||||
if: |
|
||||
${{ steps.yaml-format.outcome != 'success' }} ||
|
||||
${{ steps.python-format.outcome != 'success' }}
|
||||
run: exit 1
|
||||
dynamic-analysis:
|
||||
name: Dynamic analysis
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: pip install -r ./requirements.txt
|
||||
- name: Python linting
|
||||
id: python-linting
|
||||
run: pipx run pylint **/*.py
|
||||
continue-on-error: true
|
||||
- name: Job status
|
||||
if: ${{ steps.python-linting.outcome != 'success' }}
|
||||
run: exit 1
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
name: Post build status to Discord
|
||||
|
||||
inputs:
|
||||
|
|
Loading…
Reference in a new issue