Skip to content

Let CI only run on PR and when PR is merged. #15

Let CI only run on PR and when PR is merged.

Let CI only run on PR and when PR is merged. #15

Workflow file for this run

name: black

Check failure on line 1 in .github/workflows/black.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/black.yaml

Invalid workflow file

`pull-request` is not a valid event name
on:
push:
branches:
- main
pull-request:
branches:
- main
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install black
run: |
python -m pip install --upgrade pip
pip install black
- name: Analysing the code with black
run: black --check $(git ls-files '*.py')