forked from arcee-ai/mergekit
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 890 Bytes
/
pre-commit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: pre-commit
on:
pull_request:
push:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- uses: pre-commit/action@v3.0.0
pytest:
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request'
name: PyTest
needs: [pre-commit]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version: ["3.9", "3.10", "3.11"]
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
cache: "pip"
- name: Install dependencies
run: pip3 install -U -e .[test]
- name: Run tests
run: pytest .