From 12894f1c9b97966480346c900fc2f2d2f92e6d9b Mon Sep 17 00:00:00 2001 From: Paul-Henry Kajfasz Date: Tue, 16 Jul 2024 22:19:58 +0200 Subject: [PATCH] Move changelog workflow + remove windows test --- .github/workflows/changelog.yml | 28 ----------------- .github/workflows/lint.yml | 55 ++++++++++++++++++++++----------- .github/workflows/test.yml | 35 --------------------- 3 files changed, 37 insertions(+), 81 deletions(-) delete mode 100644 .github/workflows/changelog.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index 1de1b6372c..0000000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Changelog - -on: - pull_request: - types: [opened, synchronize, reopened] - -jobs: - check-changelog: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@main - with: - fetch-depth: 0 - - - name: Check if CHANGELOG.md is modified - run: | - # Get the list of changed files in the PR - changed_files=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...${{ github.sha }}) - - # Check if CHANGELOG.md is in the list of changed files - if echo "$changed_files" | grep -q '^CHANGELOG.md$'; then - echo "CHANGELOG.md has been modified." - else - echo $'::warning file=CHANGELOG.md::CHANGELOG.md has not been modified.\n This warning can be ignored if is has been explicitely decided not to log changes.\n Except in this situation, make sure to add log changes.' - exit 1 - fi diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5f31d541fb..229c390864 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,16 +9,16 @@ on: types: [opened, reopened, synchronize] jobs: - version: - name: check rust version consistency + clippy: + name: clippy nightly on ubuntu-latest runs-on: ubuntu-latest steps: - uses: actions/checkout@main - with: - profile: minimal - override: true - - name: check rust versions - run: ./scripts/check-rust-version.sh + - name: Clippy + run: | + rustup update --no-self-update nightly + rustup +nightly component add clippy + make clippy rustfmt: name: rustfmt check nightly on ubuntu-latest @@ -31,17 +31,6 @@ jobs: rustup +nightly component add rustfmt make format-check - clippy: - name: clippy nightly on ubuntu-latest - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Clippy - run: | - rustup update --no-self-update nightly - rustup +nightly component add clippy - make clippy - doc: name: doc stable on ubuntu-latest runs-on: ubuntu-latest @@ -52,3 +41,33 @@ jobs: rustup update --no-self-update make doc + version: + name: check rust version consistency + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + with: + profile: minimal + override: true + - name: check rust versions + run: ./scripts/check-rust-version.sh + + check-changelog: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@main + with: + fetch-depth: 0 + - name: Check if CHANGELOG.md is modified + run: | + # Get the list of changed files in the PR + changed_files=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...${{ github.sha }}) + + # Check if CHANGELOG.md is in the list of changed files + if echo "$changed_files" | grep -q '^CHANGELOG.md$'; then + echo "CHANGELOG.md has been modified." + else + echo $'::warning file=CHANGELOG.md::CHANGELOG.md has not been modified.\n This warning can be ignored if is has been explicitely decided not to log changes.\n Except in this situation, make sure to add log changes.' + exit 1 + fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1eb16b3a77..836e01b0d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,38 +22,3 @@ jobs: run: | rustup update --no-self-update ${{matrix.toolchain}} make test - - test-windows: - name: Test Rust nightly on windows-2022 - # run windows check only when the target is `main`. will execute for release, push or PR. - runs-on: windows-2022 - strategy: - fail-fast: false - steps: - - uses: actions/checkout@main - - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - name: Perform tests - run: make test - - test-windows-second: - name: test ${{matrix.toolchain}} on windows-2022 - runs-on: windows-2022 - strategy: - fail-fast: false - matrix: - toolchain: [stable, nightly] - timeout-minutes: 30 - steps: - - uses: actions/checkout@main - - uses: taiki-e/install-action@nextest - - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{matrix.toolchain}} - override: true - - name: Perform tests - run: make test