Update CI
This commit is contained in:
13
.github/workflows/CI.yml
vendored
13
.github/workflows/CI.yml
vendored
@@ -24,19 +24,20 @@ jobs:
|
|||||||
run: npx mocha
|
run: npx mocha
|
||||||
- name: Check if CookieMonsterDev.js is built correctly
|
- name: Check if CookieMonsterDev.js is built correctly
|
||||||
run: |
|
run: |
|
||||||
npx webpack -o ./tmp --env production
|
npx webpack -o ./tmp --env minimize
|
||||||
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 tmp/CookieMonsterDev.js); then
|
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 tmp/CookieMonsterDev.js); then
|
||||||
echo '### SUCCESS: CookieMonsterDev is correctly built! ###'
|
echo '### SUCCESS: CookieMonsterDev is built correctly! ###'
|
||||||
else
|
else
|
||||||
echo '### WARNING: CookieMonsterDev.js does not seem to be correct. Make sure to run "npm run build" after saving all your changes! ###'
|
echo '### WARNING: CookieMonsterDev.js does not seem to be correct. Make sure to run "npm run build-dev" after saving all your changes! ###'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Check if CookieMonster.js is built correctly
|
- name: Check if CookieMonster.js is built correctly
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: |
|
||||||
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 dist/CookieMonster.js); then
|
npx webpack -o ./tmp --env minimize --env finalfile
|
||||||
echo '### SUCCESS: CookieMonster is correctly built! ###'
|
if cmp <(head -n 2 dist/CookieMonster.js) <(head -n 2 tmp/CookieMonster.js); then
|
||||||
|
echo '### SUCCESS: CookieMonster is built correctly! ###'
|
||||||
else
|
else
|
||||||
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to copy CookieMonsterDev.js into CookieMonster.js before merging to master! ###'
|
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to run "npm run build-final" after saving all your changes! ###'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user