Skip to content

Merge branch 'main' of https://github.com/moverseai/moai #80

Merge branch 'main' of https://github.com/moverseai/moai

Merge branch 'main' of https://github.com/moverseai/moai #80

Workflow file for this run

name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose --color" # --diff
src: "."
# jupyter: true
version: "24.4.2"
- uses: isort/isort-action@f14e57e1d457956c45a19c05a89cccdf087846e5
with: # https://github.com/isort/isort-action
isort-version: 5.13.2
configuration: --check-only --profile black # --diff
notify_failure:
runs-on: ubuntu-latest
needs: [lint]
if: ${{ always() && contains(needs.*.result, 'failure') }} # see https://stackoverflow.com/questions/71430668/how-to-run-a-github-actions-job-on-workflow-failure
steps:
- name: notification
uses: appleboy/discord-action@4c196125180125310ac20c72034757bb71020383
# if: ${{ failure() }}
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#DAA520" # "#48f442"
avatar_url: "https://black.readthedocs.io/en/stable/_static/logo2-readme.png"
username: "Black Formatter"
message: "The _${{ github.event_name }}_ @ `${{ github.ref_name }}#${{ github.sha }}` needs to be `black` formatted."