Files
django-example-app/.github/workflows/ci.yml
Basyrov Rustam e5e2c104f7 remove fake job
2025-06-06 11:17:08 +03:00

68 lines
1.9 KiB
YAML

name: CI-pipeline
on:
workflow_dispatch:
pull_request:
branches:
- main
types:
- opened
jobs:
linters:
runs-on: ubuntu-latest
steps:
- name: Getting the codebase
uses: actions/checkout@v4
with:
ref: dev
- name: Lint the Dockerfile
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: Dockerfile
- name: Lint the source code # TODO: use pylint from pip -- it can fail
uses: Silleellie/pylint-github-action@v2.1
with:
lint-path: |
mysite
polls
manage.py
requirements-path: requirements.txt
readme-path: README.md
python-version: 3.11 # python version which will lint the package
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests
run: pytest
- name: Notify in telegram about fail
if: ${{ failure() }}
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
PyTest success
Commit message: ${{ github.event.commits[0].message }}
Repository: ${{ github.repository }}
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
- name: Notify in telegram about success
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
Workflow success
Commit message: ${{ github.event.commits[0].message }}
Repository: ${{ github.repository }}
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}