2020-12-01 10:46:42 +00:00
|
|
|
name: Testing
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2021-02-25 11:02:08 +00:00
|
|
|
test:
|
2020-12-01 10:46:42 +00:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '12.x'
|
|
|
|
- run: npm ci
|
2021-02-09 12:47:27 +00:00
|
|
|
- run: result=$(find src -type f -iname '*.html' -exec sh -c 'cat {} | tr "\n" " " | grep -Eo "class=\"[^\"]+\"[^>]+class=\"" ' \; | wc -l); test $result -eq 0
|
2020-12-01 10:46:42 +00:00
|
|
|
- run: npm run lint
|
2020-12-15 09:00:32 +00:00
|
|
|
- run: npx tslint -c ionic-migration.json -p tsconfig.json
|
2020-12-01 10:46:42 +00:00
|
|
|
- run: npm run test:ci
|
|
|
|
- run: npm run build:prod
|
2021-03-08 16:00:31 +00:00
|
|
|
- run: result=$(npx check-es-compat www/*.js 2> /dev/null | grep -v -E "Array\.prototype\.includes|Promise\.prototype\.finally|String\.prototype\.(matchAll|trimRight)|globalThis" | grep -Po "(?<=error).*?(?=\s+ecmascript)" | wc -l); test $result -eq 0
|