Skip to content

Linter adjustements #134

Linter adjustements

Linter adjustements #134

Workflow file for this run

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 }}