Files
OpenLLM/.github/workflows/ci.yml
2023-06-03 22:56:00 -07:00

37 lines
1.1 KiB
YAML

name: ci
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 0 * * 1/2'
env:
LINES: 120
COLUMNS: 120
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:
codestyle_check:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup CI
uses: ./.github/actions/setup-repo
- name: Format check
run: hatch run dev:style
- name: Lint check
run: hatch run dev:typing
- name: Type check
if: ${{ github.event_name == 'pull_request' }}
run: git diff --name-only --diff-filter=AM "origin/$GITHUB_BASE_REF" -z -- '*.py{,i}' | xargs -0 --no-run-if-empty hatch run dev:typing
concurrency:
group: ci-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true