Check the git status output is empty in CI to avoid uncommitted build artifacts (#61)
This commit is contained in:
1
.github/workflows/CI.yml
vendored
1
.github/workflows/CI.yml
vendored
@ -37,3 +37,4 @@ jobs:
|
|||||||
- run: yarn lint
|
- run: yarn lint
|
||||||
- run: yarn compile
|
- run: yarn compile
|
||||||
- run: yarn test
|
- run: yarn test
|
||||||
|
- run: yarn check-compile-output
|
||||||
|
|||||||
14
package.json
14
package.json
@ -2,9 +2,6 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"solc": "0.5.16"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "^4.2.6",
|
"@types/chai": "^4.2.6",
|
||||||
"@types/mocha": "^5.2.7",
|
"@types/mocha": "^5.2.7",
|
||||||
@ -14,13 +11,18 @@
|
|||||||
"mocha": "^6.2.2",
|
"mocha": "^6.2.2",
|
||||||
"prettier": "^1.19.1",
|
"prettier": "^1.19.1",
|
||||||
"rimraf": "^3.0.0",
|
"rimraf": "^3.0.0",
|
||||||
|
"solc": "0.5.16",
|
||||||
"ts-node": "^8.5.4",
|
"ts-node": "^8.5.4",
|
||||||
"typescript": "^3.7.3"
|
"typescript": "^3.7.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "yarn prettier ./test/*.ts --check",
|
"lint": "yarn prettier ./test/*.ts --check",
|
||||||
"compile": "rimraf ./build/ && waffle .waffle.json",
|
"clean": "rimraf ./build/",
|
||||||
"test": "mocha"
|
"precompile": "yarn clean",
|
||||||
|
"compile": "waffle .waffle.json",
|
||||||
|
"pretest": "yarn compile",
|
||||||
|
"test": "mocha",
|
||||||
|
"check-compile-output": "./scripts/check-compile-output.sh"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0-or-later"
|
"license": "GPL-3.0-or-later"
|
||||||
}
|
}
|
||||||
11
scripts/check-compile-output.sh
Executable file
11
scripts/check-compile-output.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Checks that there are no uncommitted files in the repo.
|
||||||
|
if [[ -z $(git status -s) ]]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "There are uncommitted file changes!"
|
||||||
|
echo "The committed build artifacts likely do not match the source code."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user