Browse Source

add citest and inter test

master
wenmeng.zwm 3 years ago
parent
commit
d7298862b0
2 changed files with 79 additions and 0 deletions
  1. +55
    -0
      .github/workflows/citest.yaml
  2. +24
    -0
      .github/workflows/lint.yaml

+ 55
- 0
.github/workflows/citest.yaml View File

@@ -0,0 +1,55 @@
name: citest

on:
push:
branches:
- master
- "release/**"
paths-ignore:
- "setup.*"
- "requirements.txt"
- "requirements/**"
- "docs/**"
- "tools/**"
- ".dev_scripts/**"
- "README.md"
- "README_zh-CN.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_zh-CN.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: [modelscope-self-hosted]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: 'true'
- name: Checkout LFS objects
run: git lfs checkout
- name: Run unittest
shell: bash
run: |
set -e
source ~/ci_env.sh
bash .dev_scripts/dockerci.sh

+ 24
- 0
.github/workflows/lint.yaml View File

@@ -0,0 +1,24 @@
name: Lint test

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install pre-commit hook
run: |
pip install pre-commit
cp .github/hooks/pre-commit .git/hooks/
- name: Linting
run: pre-commit run --all-files


Loading…
Cancel
Save