diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e34f02a60..303520c27 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,104 +11,6 @@ on: - cron: "0 0 * * 0" jobs: - ensure-conventions: - name: Ensure conventions are followed - runs-on: ubuntu-latest - - steps: - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - uses: actions/checkout@v2 - - - name: Ensure src/lib.rs files exist - run: bash ./_test/ensure-lib-src-rs-exist.sh - - - name: Count ignores - run: sh ./_test/count-ignores.sh - - - name: Check UUIDs - run: sh ./_test/check-uuids.sh - - - name: Verify exercise difficulties - run: ./_test/verify-exercise-difficulties.sh - - - name: Check exercises for authors - run: ./_test/check-exercises-for-authors.sh - - configlet: - name: Setup configlet - runs-on: ubuntu-latest - - steps: - # Checks out master locally so that it is available to the scripts. - - name: Checkout master - uses: actions/checkout@v2 - with: - ref: master - - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - uses: actions/checkout@v2 - - - name: Fetch configlet - run: ./bin/fetch-configlet - - - name: Check configlet format - run: ./_test/check-configlet-fmt.sh - - - name: Ensure readmes are updated - run: sh ./_test/ensure-readmes-are-updated.sh - - - name: Lint configlet - run: ./bin/configlet lint . - - - compilation: - name: Check compilation - runs-on: ubuntu-latest - - strategy: - # Allows running the job multiple times with different configurations - matrix: - rust: ["stable", "beta"] - deny_warnings: ['', '1'] - - steps: - # Checks out master locally so that it is available to the scripts. - - name: Checkout master - uses: actions/checkout@v2 - with: - ref: master - - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - default: true - - # run scripts as steps - - name: Check exercises - env: - DENYWARNINGS: ${{ matrix.deny_warnings }} - run: ./_test/check-exercises.sh - continue-on-error: ${{ matrix.rust == 'beta' && matrix.deny_warnings == '1' }} - - - name: Ensure stubs compile - env: - DENYWARNINGS: ${{ matrix.deny_warnings }} - run: sh ./_test/ensure-stubs-compile.sh - continue-on-error: ${{ matrix.rust == 'beta' && matrix.deny_warnings == '1' }} - - - name: Check exercise crate - env: - DENYWARNINGS: ${{ matrix.deny_warnings }} - run: sh ./_test/check-exercise-crate.sh - continue-on-error: ${{ matrix.rust == 'beta' && matrix.deny_warnings == '1' }} - clippy: name: Clippy runs-on: ubuntu-latest @@ -141,35 +43,3 @@ jobs: env: CLIPPY: true run: ./_test/check-exercises.sh - - - name: Clippy stubs - env: - CLIPPY: true - run: sh ./_test/ensure-stubs-compile.sh - - nightly-compilation: - name: Check exercises on nightly (benchmark enabled) - runs-on: ubuntu-latest - continue-on-error: true # It's okay if the nightly job fails - - steps: - # Checks out master locally so that it is available to the scripts. - - name: Checkout master - uses: actions/checkout@v2 - with: - ref: master - - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup nightly toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - default: true - - - name: Check exercises - env: - BENCHMARK: '1' - run: ./_test/check-exercises.sh diff --git a/_test/check-exercises.sh b/_test/check-exercises.sh index 7dd0c3121..84c20f880 100755 --- a/_test/check-exercises.sh +++ b/_test/check-exercises.sh @@ -28,7 +28,7 @@ fi repo=$(cd "$(dirname "$0")/.." && pwd) -if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then +if false; then files="$(git diff --diff-filter=d --name-only remotes/origin/master | grep "exercises/" | cut -d '/' -f -2 | sort -u | awk -v repo=$repo '{print repo"/"$1}')" else files=$repo/exercises/* diff --git a/bin/test-exercise b/bin/test-exercise index 714ba41a4..17d6bad49 100755 --- a/bin/test-exercise +++ b/bin/test-exercise @@ -84,9 +84,8 @@ done cd $exercise if [ -n "$CLIPPY" ]; then # Consider any Clippy to be an error in tests only. - # For now, not the example solutions since they have many Clippy warnings, - # and are not shown to students anyway. sed -i -e '1i #![deny(clippy::all)]' tests/*.rs + sed -i -e '1i #![deny(clippy::all)]' src/lib.rs cargo clippy --tests --color always "$@" 2>clippy.log if [ $? -ne 0 ]; then cat clippy.log