Skip to content

Commit

Permalink
Move checks into pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
wjsi committed Aug 31, 2021
1 parent 2408d93 commit fa8f589
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cancel-prev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
workflow_id: core-ci.yml,os-compat-ci.yml,platform-ci.yml,checks.yml
workflow_id: core-ci.yml,os-compat-ci.yml,platform-ci.yml
89 changes: 0 additions & 89 deletions .github/workflows/checks.yml

This file was deleted.

76 changes: 75 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pr:
- v*.*

jobs:
- job: Job
- job: CI
timeoutInMinutes: 120
cancelTimeoutInMinutes: 2
pool:
Expand Down Expand Up @@ -100,3 +100,77 @@ jobs:
- bash: |
bash <(curl -s https://codecov.io/bash)
displayName: 'Upload coverage'
- job: Checks
timeoutInMinutes: 120
cancelTimeoutInMinutes: 2

variables:
PYTHON: '3.8'

steps:
- bash: |
set -e
source ci/install-conda.sh
displayName: 'Install conda'
- bash: |
source ./ci/reload-env.sh
export DEFAULT_VENV=$VIRTUAL_ENV
pip install numpy scipy cython
pip install -e ".[dev,extra]"
pip install virtualenv flake8 codespell sphinx sphinx-intl
conda list -n test
displayName: 'Install dependencies'
- bash: |
source ./ci/reload-env.sh
# stop the build if there are Python syntax errors or undefined names
flake8 mars --count --show-source --statistics
# special check for __init__.py
grep -A 10000 '\[flake8\]' setup.cfg | awk '!/(F401|F811|__init__\.py)/' > flake8_init.ini
flake8 --config=flake8_init.ini
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 mars --config="default" --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
displayName: 'Lint with flake8'
- bash: |
source ./ci/reload-env.sh
codespell
displayName: 'Check spellings'
- bash: |
source ./ci/reload-env.sh
git fetch origin master
bash ci/modecheck.sh
displayName: 'Check file mode changes'
- bash: |
source ./ci/reload-env.sh
python ci/importcheck.py
displayName: 'Check imports'
- bash: |
source ./ci/reload-env.sh
python ci/copycheck.py
displayName: 'Check copyright headers'
- bash: |
source ./ci/reload-env.sh
pushd mars/services/web/ui
npm install
npm run lint
popd
displayName: 'Check JS with ESLint'
- bash: |
source ./ci/reload-env.sh
pushd docs
pip install -r requirements-doc.txt
make html
popd
displayName: 'Check documentation build'

0 comments on commit fa8f589

Please sign in to comment.