Skip to content

Commit

Permalink
Move changelog workflow + remove windows test
Browse files Browse the repository at this point in the history
  • Loading branch information
phklive committed Jul 16, 2024
1 parent 0d06803 commit 12894f1
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 81 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/changelog.yml

This file was deleted.

55 changes: 37 additions & 18 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
35 changes: 0 additions & 35 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 12894f1

Please sign in to comment.