X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=.github%2Fworkflows%2Fclippy_bors.yml;h=f571485e6d389befdf909d2f9ab5fa7bf25db69a;hb=71c1e873907be8b50a54bce1be01fb5308ccbc0d;hp=9d24b0293c4a73d156dcc0e7cb2465b20417d460;hpb=f64149dd04514e850374d2b94ecc91ce18d1b39e;p=rust.git diff --git a/.github/workflows/clippy_bors.yml b/.github/workflows/clippy_bors.yml index 9d24b0293c4..f571485e6d3 100644 --- a/.github/workflows/clippy_bors.yml +++ b/.github/workflows/clippy_bors.yml @@ -34,15 +34,16 @@ jobs: run: | MESSAGE=$(git log --format=%B -n 1) PR=$(echo "$MESSAGE" | grep -o "#[0-9]*" | head -1 | sed -e 's/^#//') - output=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \ - python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \ - grep "^changelog: " | \ - sed "s/changelog: //g") - if [[ -z "$output" ]]; then + body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \ + python -c "import sys, json; print(json.load(sys.stdin)['body'])") + output=$(grep "^changelog:\s*\S" <<< "$body" | sed "s/changelog:\s*//g") || { echo "ERROR: PR body must contain 'changelog: ...'" exit 1 - elif [[ "$output" = "none" ]]; then + } + if [[ "$output" = "none" ]]; then echo "WARNING: changelog is 'none'" + else + echo "changelog: $output" fi env: PYTHONIOENCODING: 'utf-8' @@ -72,6 +73,7 @@ jobs: runs-on: ${{ matrix.os }} + # NOTE: If you modify this job, make sure you copy the changes to clippy.yml steps: # Setup - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master @@ -110,19 +112,32 @@ jobs: echo "$SYSROOT/bin" >> $GITHUB_PATH - name: Build - run: cargo build --features deny-warnings,internal-lints + run: cargo build --features deny-warnings,internal - - name: Test Workspace - run: cargo test --all --features deny-warnings,internal-lints + - name: Test + if: runner.os == 'Linux' + run: cargo test --features deny-warnings,internal + + - name: Test + if: runner.os != 'Linux' + run: cargo test --features deny-warnings,internal -- --skip dogfood + + - name: Test clippy_lints + run: cargo test --features deny-warnings,internal + working-directory: clippy_lints + + - name: Test clippy_utils + run: cargo test --features deny-warnings,internal + working-directory: clippy_utils + + - name: Test rustc_tools_util + run: cargo test --features deny-warnings + working-directory: rustc_tools_util - name: Test clippy_dev run: cargo test --features deny-warnings working-directory: clippy_dev - - name: Test cargo-clippy - run: ../target/debug/cargo-clippy - working-directory: clippy_workspace_tests - - name: Test clippy-driver run: bash .github/driver.sh env: