From d434a3c44e90712795a2c7820fd1ced8bcc526b1 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 9 Aug 2023 00:14:50 +0100 Subject: [PATCH] tests & docs: minor tidy --- .github/workflows/check.yml | 19 ++++++++++++------- .meta/.readme.rst | 2 +- README.rst | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 815b0bd34..2236d7703 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -16,22 +16,25 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 - uses: actions/setup-python@v4 + with: + python-version: '3.x' - run: pip install -U tox - run: tox env: TOXENV: ${{ matrix.TOXENV }} asvfull: - if: (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')) || github.event_name == 'schedule' + if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || github.event_name == 'schedule' name: Benchmark (Full) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 + token: ${{ secrets.GH_TOKEN || github.token }} - uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Install run: | pip install -U wheel @@ -58,7 +61,7 @@ jobs: GIT_AUTHOR_NAME: ${{ github.actor }} GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com testasv: - if: github.event.ref != 'refs/heads/master' && ! startsWith(github.event.ref, 'refs/tags') + if: github.ref != 'refs/heads/master' && ! startsWith(github.ref, 'refs/tags') name: Benchmark (Branch) runs-on: ubuntu-latest steps: @@ -66,6 +69,8 @@ jobs: with: fetch-depth: 0 - uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Install run: | pip install -U wheel @@ -82,6 +87,6 @@ jobs: - name: Benchmark run: | 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 + CHANGES=$(asv compare --only-changed -f 1.25 master HEAD) + echo "$CHANGES" >> "$GITHUB_STEP_SUMMARY" + test -z "$CHANGES" || exit 1 diff --git a/.meta/.readme.rst b/.meta/.readme.rst index 2e3588ea4..4e325bcd2 100644 --- a/.meta/.readme.rst +++ b/.meta/.readme.rst @@ -255,7 +255,7 @@ This can be beautified further: .. code:: sh - $ BYTES="$(du -sb docs/ | cut -f1)" + $ BYTES=$(du -sb docs/ | cut -f1) $ tar -cf - docs/ \ | tqdm --bytes --total "$BYTES" --desc Processing | gzip \ | tqdm --bytes --total "$BYTES" --desc Compressed --position 1 \ diff --git a/README.rst b/README.rst index 1ab09a3e6..defa9ad35 100644 --- a/README.rst +++ b/README.rst @@ -255,7 +255,7 @@ This can be beautified further: .. code:: sh - $ BYTES="$(du -sb docs/ | cut -f1)" + $ BYTES=$(du -sb docs/ | cut -f1) $ tar -cf - docs/ \ | tqdm --bytes --total "$BYTES" --desc Processing | gzip \ | tqdm --bytes --total "$BYTES" --desc Compressed --position 1 \