Upload ms-swift/.github/workflows/citest.yaml with huggingface_hub
Browse files
ms-swift/.github/workflows/citest.yaml
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: citest
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- master
|
| 7 |
+
- "release/**"
|
| 8 |
+
paths-ignore:
|
| 9 |
+
- "setup.*"
|
| 10 |
+
- "requirements.txt"
|
| 11 |
+
- "requirements/**"
|
| 12 |
+
- "docs/**"
|
| 13 |
+
- "tools/**"
|
| 14 |
+
- ".dev_scripts/**"
|
| 15 |
+
- "README.md"
|
| 16 |
+
- "README_*.md"
|
| 17 |
+
- "NOTICE"
|
| 18 |
+
- ".github/workflows/lint.yaml"
|
| 19 |
+
- ".github/workflows/publish.yaml"
|
| 20 |
+
|
| 21 |
+
pull_request:
|
| 22 |
+
paths-ignore:
|
| 23 |
+
- "setup.*"
|
| 24 |
+
- "requirements.txt"
|
| 25 |
+
- "requirements/**"
|
| 26 |
+
- "docs/**"
|
| 27 |
+
- "tools/**"
|
| 28 |
+
- ".dev_scripts/**"
|
| 29 |
+
- "README.md"
|
| 30 |
+
- "README_*.md"
|
| 31 |
+
- "NOTICE"
|
| 32 |
+
- ".github/workflows/lint.yaml"
|
| 33 |
+
- ".github/workflows/publish.yaml"
|
| 34 |
+
|
| 35 |
+
concurrency:
|
| 36 |
+
group: ${{ github.workflow }}-${{ github.ref }}
|
| 37 |
+
cancel-in-progress: true
|
| 38 |
+
|
| 39 |
+
jobs:
|
| 40 |
+
unittest:
|
| 41 |
+
# The type of runner that the job will run on
|
| 42 |
+
runs-on: [self-hosted]
|
| 43 |
+
timeout-minutes: 240
|
| 44 |
+
steps:
|
| 45 |
+
- name: ResetFileMode
|
| 46 |
+
shell: bash
|
| 47 |
+
run: |
|
| 48 |
+
# reset filemode to allow action runner to delete files
|
| 49 |
+
# generated by root in docker
|
| 50 |
+
set -e
|
| 51 |
+
source ~/.bashrc
|
| 52 |
+
sudo chown -R $USER:$USER $ACTION_RUNNER_DIR
|
| 53 |
+
|
| 54 |
+
- name: Checkout
|
| 55 |
+
uses: actions/checkout@v3
|
| 56 |
+
with:
|
| 57 |
+
lfs: 'true'
|
| 58 |
+
submodules: 'true'
|
| 59 |
+
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
|
| 60 |
+
- name: Get changed files
|
| 61 |
+
id: changed-files
|
| 62 |
+
run: |
|
| 63 |
+
if ${{ github.event_name == 'pull_request' }}; then
|
| 64 |
+
echo "PR_CHANGED_FILES=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_ENV
|
| 65 |
+
else
|
| 66 |
+
echo "PR_CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_ENV
|
| 67 |
+
fi
|
| 68 |
+
- name: Checkout LFS objects
|
| 69 |
+
run: git lfs checkout
|
| 70 |
+
- name: Run unittest
|
| 71 |
+
shell: bash
|
| 72 |
+
run: |
|
| 73 |
+
set -e
|
| 74 |
+
source /mnt/modelscope/ci_env.sh
|
| 75 |
+
bash .dev_scripts/dockerci.sh
|