This commit is contained in:
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@@ -17,12 +17,13 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: dev
|
ref: dev
|
||||||
|
|
||||||
- name: Lint the Dockerfile
|
- name: Lint the Dockerfile
|
||||||
uses: hadolint/hadolint-action@v3.1.0
|
uses: hadolint/hadolint-action@v3.1.0
|
||||||
with:
|
with:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
|
||||||
- name: Lint the source code
|
- name: Lint the source code # TODO: use pylint from pip -- it can fail
|
||||||
uses: Silleellie/pylint-github-action@v2.1
|
uses: Silleellie/pylint-github-action@v2.1
|
||||||
with:
|
with:
|
||||||
lint-path: |
|
lint-path: |
|
||||||
@@ -33,14 +34,40 @@ jobs:
|
|||||||
readme-path: README.md
|
readme-path: README.md
|
||||||
python-version: 3.11 # python version which will lint the package
|
python-version: 3.11 # python version which will lint the package
|
||||||
|
|
||||||
- name: Notify in telegram about success
|
- 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
|
uses: appleboy/telegram-action@master
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
message: |
|
message: |
|
||||||
PyTest successed
|
PyTest success
|
||||||
|
Commit message: ${{ github.event.commits[0].message }}
|
||||||
|
Repository: ${{ github.repository }}
|
||||||
|
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
|
||||||
|
|
||||||
|
- name: Check fail
|
||||||
|
run: echo "Unreachable"
|
||||||
|
|
||||||
|
- name: Notify in telegram about success
|
||||||
|
if: ${{ failure() }}
|
||||||
|
uses: appleboy/telegram-action@master
|
||||||
|
with:
|
||||||
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
|
message: |
|
||||||
|
Workflow success
|
||||||
Commit message: ${{ github.event.commits[0].message }}
|
Commit message: ${{ github.event.commits[0].message }}
|
||||||
Repository: ${{ github.repository }}
|
Repository: ${{ github.repository }}
|
||||||
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
|
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
|
||||||
|
|||||||
Reference in New Issue
Block a user