-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add CHANGELOG check and specific targets (#456)
* add CHANGELOG check in CI * use a different workflow * add rust-toolchain.md * ci: add check workflow, add check to makefile * add no-changelog tag * chore: Fix build after base updates (#457) * chore: fix build and serialize procedures as bytes * chore: Point node to next * Fix node config file * use script for changelog workflow * add phony in check and check-wasm * execution permissions on check-changelog * remove check workflow --------- Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com>
- Loading branch information
1 parent
1bf1fe8
commit c224107
Showing
15 changed files
with
90 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Runs changelog related jobs. | ||
# CI job heavily inspired by: https://github.com/tarides/changelog-check-action | ||
|
||
name: changelog | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, labeled, unlabeled] | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@main | ||
with: | ||
fetch-depth: 0 | ||
- name: Check for changes in changelog | ||
env: | ||
BASE_REF: ${{ github.event.pull_request.base.ref }} | ||
NO_CHANGELOG_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'no changelog') }} | ||
run: ./scripts/check-changelog.sh "${{ inputs.changelog }}" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[toolchain] | ||
channel = "1.78" | ||
components = ["rustfmt", "rust-src", "clippy"] | ||
targets = ["wasm32-unknown-unknown"] | ||
profile = "minimal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
set -uo pipefail | ||
|
||
CHANGELOG_FILE="${1:-CHANGELOG.md}" | ||
|
||
if [ "${NO_CHANGELOG_LABEL}" = "true" ]; then | ||
# 'no changelog' set, so finish successfully | ||
echo "\"no changelog\" label has been set" | ||
exit 0 | ||
else | ||
# a changelog check is required | ||
# fail if the diff is empty | ||
if git diff --exit-code "origin/${BASE_REF}" -- "${CHANGELOG_FILE}"; then | ||
>&2 echo "Changes should come with an entry in the \"CHANGELOG.md\" file. This behavior | ||
can be overridden by using the \"no changelog\" label, which is used for changes | ||
that are trivial / explicitely stated not to require a changelog entry." | ||
exit 1 | ||
fi | ||
|
||
echo "The \"CHANGELOG.md\" file has been updated." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters