diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index be33aac3c1..cd42ff44b7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -16,8 +16,8 @@ env: LC_ALL: en_US.UTF-8 jobs: - lint: - name: Check linting issues + size: + name: Report respec-w3c size runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -29,50 +29,22 @@ jobs: with: path: ~/.npm key: ${{ runner.os }}-node-12-${{ hashFiles('**/package-lock.json') }} - - 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@v1 - with: - node-version: 12 - - name: Cache node modules - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-node-12-${{ hashFiles('**/package-lock.json') }} - - name: install & build + - name: Get current size + id: current-size run: | npm ci npm run build:w3c - - run: npm run test: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@v1 - with: - node-version: 12 - - name: Cache node modules - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-node-12-${{ hashFiles('**/package-lock.json') }} - - name: install & build + gzip -k builds/respec-w3c.js + stat -c "%6s %n" builds/respec-w3c.js* + git clean -fd && git checkout -- . + - name: Get base size + id: base-size run: | + git fetch --depth=1 origin +refs/heads/${{ github.base_ref }} + git checkout ${{ github.base_ref }} npm ci - npm run build:w3c & npm run build:geonovum - - run: npm run test:karma - env: - BROWSERS: ${{ matrix.browser }} + npm run build:w3c + gzip -k builds/respec-w3c.js + stat -c "%6s %n" builds/respec-w3c.js* + git clean -fd && git checkout -- . + git checkout -