forked from TrueCloudLab/neoneo-go
workflows: protect go.mod from unexpected imports
Avoid situations like #3458. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
0ae5e7ea83
commit
f4aeaa6387
1 changed files with 8 additions and 0 deletions
8
.github/workflows/tests.yml
vendored
8
.github/workflows/tests.yml
vendored
|
@ -39,6 +39,14 @@ jobs:
|
||||||
- name: Check dependencies
|
- name: Check dependencies
|
||||||
run: |
|
run: |
|
||||||
./scripts/check_deps.sh
|
./scripts/check_deps.sh
|
||||||
|
- name: Check go.mod is tidy
|
||||||
|
run: |
|
||||||
|
go mod tidy
|
||||||
|
if [[ $(git diff --name-only go.* | grep '' -c) != 0 ]]; then
|
||||||
|
echo "go mod tidy should be executed before the merge, following packages are unused or out of date:";
|
||||||
|
git diff go.*;
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
codegencheck:
|
codegencheck:
|
||||||
name: Check code generated with 'go generate' is up-to-date
|
name: Check code generated with 'go generate' is up-to-date
|
||||||
|
|
Loading…
Reference in a new issue