-
Notifications
You must be signed in to change notification settings - Fork 321
83 lines (72 loc) · 2.14 KB
/
citest.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: citest
on:
push:
branches:
- master
- "release/**"
paths-ignore:
- "setup.*"
- "requirements.txt"
- "apps/**"
- "docs/**"
- "demo/**"
- "config/**"
- "resource/**"
- "README.md"
- "README_CN.md"
- "NOTICE"
- ".github/workflows/lint.yaml"
pull_request:
paths-ignore:
- "setup.*"
- "requirements.txt"
- "apps/**"
- "docs/**"
- "demo/**"
- "config/**"
- "resource/**"
- "README.md"
- "README_zh-CN.md"
- "NOTICE"
- ".github/workflows/lint.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unittest:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 60
environment: testci
steps:
- uses: actions/checkout@v3
# - name: Cache Python dependencies
# uses: actions/cache@v3
# id: cache
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
- name: Set up Python 3.10.14
uses: actions/setup-python@v3
with:
python-version: "3.10.14"
# Add a step to check if it's a fork and set an environment variable
- name: Check if PR is from a fork
run: echo "IS_FORKED_PR=${{ github.event.pull_request.head.repo.fork }}" >> $GITHUB_ENV
- name: Update pip
run: pip install --upgrade pip
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements.txt
- name: Run tests
env:
AMAP_TOKEN: ${{ secrets.AMAP_TOKEN }}
BING_SEARCH_V7_SUBSCRIPTION_KEY: ${{ secrets.BING_SEARCH_V7_SUBSCRIPTION_KEY }}
DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }}
MODELSCOPE_API_TOKEN: ${{ secrets.MODELSCOPE_API_TOKEN }}
OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }}
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
OSS_BUCKET_NAME: ${{ secrets.OSS_BUCKET_NAME }}
OSS_ENDPOINT: ${{ secrets.OSS_ENDPOINT }}
shell: bash
run: bash .dev_scripts/dockerci.sh