tqdm/.github/workflows/check.yml

111 lines
3.2 KiB
YAML
Raw Normal View History

2020-11-15 21:02:39 +00:00
name: Check
2020-07-10 17:36:15 +00:00
on:
push:
2020-11-15 21:02:39 +00:00
pull_request:
2020-07-10 17:36:15 +00:00
schedule:
- cron: '36 1 * * SUN' # M H d m w (Sundays at 01:36)
jobs:
2020-11-15 21:02:39 +00:00
check:
if: github.event_name != 'pull_request' || github.head_ref != 'devel'
2020-11-17 13:57:42 +00:00
name: ${{ matrix.TOXENV }}
2020-11-15 21:02:39 +00:00
strategy:
matrix:
TOXENV:
2020-11-17 13:57:42 +00:00
- setup.py
2020-11-15 21:02:39 +00:00
- perf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
2020-11-15 21:02:39 +00:00
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip install -U tox
- run: tox
2020-11-15 21:02:39 +00:00
env:
TOXENV: ${{ matrix.TOXENV }}
2020-11-17 13:57:42 +00:00
lint:
if: github.event_name != 'pull_request' || github.head_ref != 'devel'
2020-11-17 13:57:42 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: reviewdog/action-setup@v1
- run: pip install -U flake8
- name: flake8
run: |
set -o pipefail
flake8 -j8 --count --statistics . | \
reviewdog -f=pep8 -name=flake8 -tee -reporter=github-check -filter-mode nofilter
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020-07-10 17:36:15 +00:00
asvfull:
2020-07-11 01:02:15 +00:00
if: (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')) || github.event_name == 'schedule'
2020-11-15 21:02:39 +00:00
name: Benchmark (Full)
2020-07-10 17:36:15 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install
run: |
pip install -U wheel
pip install -U virtualenv asv
2020-07-10 18:26:37 +00:00
asv machine --machine github-actions --yes
2020-07-10 17:36:15 +00:00
git fetch --tags
2020-07-10 18:26:37 +00:00
git fetch origin master:master
2020-07-10 19:29:32 +00:00
- name: Restore previous results
2020-07-10 18:26:37 +00:00
uses: actions/cache@v2
with:
path: .asv
key: asv-${{ runner.os }}
restore-keys: |
asv-
2020-07-10 19:29:32 +00:00
- name: Benchmark
2020-07-10 17:36:15 +00:00
run: |
2020-07-10 21:27:36 +00:00
asv run -j 8 --interleave-processes --skip-existing v3.2.0..HEAD
2020-07-10 19:29:32 +00:00
- name: Build pages
run: |
git config --global user.email "$GIT_AUTHOR_EMAIL"
git config --global user.name "$GIT_AUTHOR_NAME"
2020-07-10 17:36:15 +00:00
asv gh-pages --no-push
2020-07-10 19:29:32 +00:00
git push -f origin gh-pages:gh-pages
env:
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com
2020-07-10 21:27:36 +00:00
testasv:
2020-11-15 21:02:39 +00:00
if: github.event.ref != 'refs/heads/master' && ! startsWith(github.event.ref, 'refs/tags')
name: Benchmark (Branch)
2020-07-10 21:27:36 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install
run: |
pip install -U wheel
pip install -U virtualenv asv
asv machine --machine github-actions --yes
git fetch --tags
2020-07-16 22:31:13 +00:00
git fetch origin master:master
2020-07-10 21:27:36 +00:00
- name: Restore previous results
uses: actions/cache@v2
with:
path: .asv
key: asv-${{ runner.os }}
restore-keys: |
asv-
- name: Benchmark
run: |
2020-07-16 22:31:13 +00:00
asv continuous --interleave-processes --only-changed -f 1.25 master HEAD
CHANGES="$(asv compare --only-changed -f 1.25 master HEAD)"
echo "$CHANGES"
[ -z "$CHANGES" ] || exit 1