Files
OpenLLM/.github/workflows/ci.yml
2023-06-18 20:03:17 -04:00

50 lines
1.5 KiB
YAML

# Copyright 2023 BentoML Team. All rights reserved.
#
# 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: ci
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 0 * * 1/2'
env:
LINES: 120
COLUMNS: 120
OPENLLM_DO_NOT_TRACK: True
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
jobs:
tests:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
name: tests-${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup CI
uses: ./.github/actions/setup-repo
- name: Run tests
run: hatch run test:p
concurrency:
group: ci-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true