-
Notifications
You must be signed in to change notification settings - Fork 15
60 lines (49 loc) · 1.44 KB
/
pr.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
name: Pull Request
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Extract dependent Pull Requests
uses: depends-on/depends-on-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install poetry
run: |
set -ex
curl -sSL https://install.python-poetry.org | python3 -
poetry --version
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'poetry'
- name: Run pre-commit checks
run: |
set -ex
poetry install --with test
poetry run pip3 install torch
poetry run pre-commit run -a --show-diff-on-failure -v
- name: Run integration tests
env:
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
set -ex
./integration-test.sh
check-all-dependencies-are-merged:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Check all dependent Pull Requests are merged
uses: depends-on/depends-on-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
check-unmerged-pr: true
...