diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..17f4686 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -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 + diff --git a/action.yml b/action.yml index de000d9..15191da 100644 --- a/action.yml +++ b/action.yml @@ -1,3 +1,4 @@ +--- name: Post build status to Discord inputs: