Use await instead of Promise, fixes tests #136
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 1EdTech CI (PR) | |
on: | |
pull_request: | |
paths-ignore: | |
- "**" | |
- "!**.js" | |
- "!**.json" | |
- "!**.css" | |
- "!**.html" | |
- "!.github/workflows/**" | |
env: | |
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 | |
PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome | |
# See https://github.com/w3c/respec/pull/3306 | |
LC_ALL: en_US.UTF-8 | |
FORCE_COLOR: 1 | |
jobs: | |
lint: | |
name: Check linting issues | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Ensure builds/ has not changed | |
run: | | |
curl -sL https://api.github.com/repos/w3c/respec/pulls/${{ github.event.pull_request.number }}/files -o /tmp/pr_files.json | |
cat /tmp/pr_files.json | jq -r '.[].filename' | grep -qE "^builds/" || exit 0 | |
echo "::error::Uh oh! builds/ was changed."; exit 1 | |
- uses: actions/setup-node@v2 | |
with: { node-version: 14, cache: npm } | |
- run: npm ci | |
- run: npm run lint | |
test-headless: | |
name: Headless Tests | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: { node-version: 14, cache: npm } | |
- run: npm ci | |
- run: npm run test:build | |
- run: npm run build:w3c | |
- run: npm run test:headless | |
- run: npm run build:1edtech | |
- run: npm run test:1edtech-headless | |
test-karma: | |
name: Karma Unit Tests (${{ matrix.browser }}) | |
strategy: | |
matrix: | |
browser: [ChromeHeadless, FirefoxHeadless] | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: { node-version: 14, cache: npm } | |
- name: install & build | |
run: | | |
npm ci | |
npm run build:w3c & npm run build:geonovum | |
- run: npm run test:unit | |
env: | |
BROWSERS: ${{ matrix.browser }} | |
- run: npm run test:integration | |
env: | |
BROWSERS: ${{ matrix.browser }} |