Let GH actions fail if the licenses are missing

This commit is contained in:
pietervdvn 2021-04-10 15:39:00 +02:00
parent 3c0c4e875c
commit f96c440319
3 changed files with 23 additions and 5 deletions

View file

@ -8,10 +8,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/npm@master
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1.2.0
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: install deps
run: npm install
- name: create generated dir
run: mkdir ./assets/generated
- name: create stub themes
run: "echo '{\"layers\": [], \"themes\": []}' > ./assets/generated/known_layers_and_themes.json"
- name: Compile license info
run: npm run generate:licenses
run: npm run validate:licenses
- name: Compile and validate themes and layers
run: npm run generate:layeroverview
run: npm run validate:layeroverview

View file

@ -26,7 +26,7 @@ jobs:
- name: Compile license info
run: npm run generate:licenses
run: npm run validate:licenses
- name: Compile and validate themes and layers
run: npm run generate:layeroverview
run: npm run validate:layeroverview

View file

@ -17,6 +17,8 @@
"generate:docs": "ts-node scripts/generateDocs.ts",
"generate:layeroverview": "ts-node scripts/generateLayerOverview.ts --no-fail",
"generate:licenses": "ts-node scripts/generateLicenseInfo.ts --no-fail",
"validate:layeroverview": "ts-node scripts/generateLayerOverview.ts",
"validate:licenses": "ts-node scripts/generateLicenseInfo.ts",
"optimize-images": "cd assets/generated/ && find -name '*.png' -exec optipng '{}' \\; && echo 'PNGs are optimized'",
"generate": "npm run generate:images && npm run generate:translations && npm run generate:licenses",
"build": "rm -rf dist/ && npm run generate && parcel build --public-url ./ *.html assets/** assets/**/** assets/**/**/** vendor/* vendor/*/*",