Skip to content

Commit

Permalink
Browser test in enja only and cache redirects cache en jajson file (g…
Browse files Browse the repository at this point in the history
…ithub#23502)

* cache the .next/cache directory for faster builds

* browser test in en,ja only and cache .redirects-cache_en_ja.json file

* correction
  • Loading branch information
peterbe authored Dec 8, 2021
1 parent 0dd1f3f commit ca39429
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,11 @@ jobs:
path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}-${{ hashFiles('.github/workflows/browser-test.yml') }}

- name: Cache lib/redirects/.redirects-cache_en_ja.json
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
with:
path: lib/redirects/.redirects-cache_en_ja.json
key: ${{ runner.os }}-redirects-cache-${{ hashFiles('.github/workflows/browser-test.yml') }}

- name: Run browser-test
run: npm run browser-test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
"repository": "https://github.com/github/docs",
"scripts": {
"browser-test": "start-server-and-test browser-test-server 4001 browser-test-tests",
"browser-test-server": "cross-env NODE_ENV=production WEB_CONCURRENCY=1 PORT=4001 node server.mjs",
"browser-test-server": "cross-env NODE_ENV=production WEB_CONCURRENCY=1 PORT=4001 ENABLED_LANGUAGES=en,ja node server.mjs",
"browser-test-tests": "cross-env BROWSER=1 NODE_OPTIONS=--experimental-vm-modules jest tests/browser/browser.js",
"build": "next build",
"debug": "cross-env NODE_ENV=development ENABLED_LANGUAGES='en,ja' nodemon --inspect server.mjs",
Expand Down

0 comments on commit ca39429

Please sign in to comment.