SC80141 | Fix ReadTheDocs Build #441
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Formatting check | |
on: | |
- pull_request | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
# Required permissions | |
permissions: | |
pull-requests: read | |
# Set job outputs to values from filter step | |
outputs: | |
sf: ${{ steps.filter.outputs.sf }} | |
steps: | |
# For pull requests it's not necessary to checkout the code | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
sf: | |
- pennylane_sf/** | |
- tests/** | |
- .pylintrc | |
- Makefile | |
- requirements-ci.txt | |
- requirements.txt | |
- setup.py | |
black: | |
needs: changes | |
if: ${{ needs.changes.outputs.sf == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
sf: | |
- pennylane_sf/** | |
- tests/** | |
- .pylintrc | |
- Makefile | |
- requirements-ci.txt | |
- requirements.txt | |
- setup.py | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Set up Python | |
if: steps.filter.outputs.sf == 'true' | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
if: steps.filter.outputs.sf == 'true' | |
run: pip install black | |
- uses: actions/checkout@v2 | |
- name: Run Black | |
if: steps.filter.outputs.sf == 'true' | |
run: black -l 100 pennylane_sf/ --check |