Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Style

Style #430

Workflow file for this run

name: Style
concurrency:
group: style-check-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
on:
schedule:
- cron: "0 0 * * 1/2" # Every other day 12AM UTC
push:
branches: [main]
pull_request:
branches: [main]
paths:
- "requirements/**"
- ".github/actions/**"
- "monitoring/**"
- "WORKSPACE"
- "BUILD.bazel"
- "pyproject.toml"
- ".github/workflows/style.yml"
env:
LINES: 200
COLUMNS: 200
BENTOML_DEBUG: True
BENTOML_DO_NOT_TRACK: True
PYTEST_PLUGINS: bentoml.testing.pytest.plugin
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
jobs:
lint:
runs-on: ubuntu-latest
if: "!github.event.repository.fork" # Don't run on fork repository
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all tags and branches
- name: Setup CI
uses: ./.github/actions/setup-repo
- name: Run format check
run: ./hack/lint
type:
runs-on: ubuntu-latest
if: "!github.event.repository.fork" # Don't run on fork repository
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all tags and branches
- name: Setup CI
uses: ./.github/actions/setup-repo
- name: Run format check
if: ${{ github.event_name == 'pull_request' }}
run: ./hack/type