Skip to content

"Refactor lint triggering mechanism in workflows #6

"Refactor lint triggering mechanism in workflows

"Refactor lint triggering mechanism in workflows #6

Workflow file for this run

# Copyright 2022 Expedia, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Do Lint
on:
push:
branches:
- '*'
- '*/*'
- '**'
jobs:
flake8-lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Dependencies
run: pip install -r requirements-dev.txt
- name: Run Linters
run: |
isort .
black .
docformatter --check --config pyproject.toml . || true
docformatter --in-place --config pyproject.toml . || true
dispatch:
runs-on: ubuntu-latest
name: Dispatch Completion Event
outputs:
workflow_run_id: ${{ github.run_id }}
steps:
- name: Dispatch Completion Event
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: lint-completed