This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
name: citest
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- "release/**"
|
||||
paths-ignore:
|
||||
- "setup.*"
|
||||
- "requirements.txt"
|
||||
- "requirements/**"
|
||||
- "docs/**"
|
||||
- "tools/**"
|
||||
- ".dev_scripts/**"
|
||||
- "README.md"
|
||||
- "README_*.md"
|
||||
- "NOTICE"
|
||||
- ".github/workflows/lint.yaml"
|
||||
- ".github/workflows/publish.yaml"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "setup.*"
|
||||
- "requirements.txt"
|
||||
- "requirements/**"
|
||||
- "docs/**"
|
||||
- "tools/**"
|
||||
- ".dev_scripts/**"
|
||||
- "README.md"
|
||||
- "README_*.md"
|
||||
- "NOTICE"
|
||||
- ".github/workflows/lint.yaml"
|
||||
- ".github/workflows/publish.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: [self-hosted]
|
||||
timeout-minutes: 240
|
||||
steps:
|
||||
- name: ResetFileMode
|
||||
shell: bash
|
||||
run: |
|
||||
# reset filemode to allow action runner to delete files
|
||||
# generated by root in docker
|
||||
set -e
|
||||
source ~/.bashrc
|
||||
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
env:
|
||||
GIT_CONFIG_PARAMETERS: "'core.hooksPath='"
|
||||
with:
|
||||
lfs: 'true'
|
||||
submodules: 'false'
|
||||
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
run: |
|
||||
if ${{ github.event_name == 'pull_request' }}; then
|
||||
echo "PR_CHANGED_FILES=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_ENV
|
||||
else
|
||||
echo "PR_CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Checkout LFS objects
|
||||
run: git lfs checkout
|
||||
- name: Run unittest
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
source /mnt/modelscope/ci_env.sh
|
||||
bash .dev_scripts/dockerci.sh
|
||||
Reference in New Issue
Block a user