-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/abcnews/env-utils
* 'master' of https://github.com/abcnews/env-utils: Fix caching of memoized functions which call other memoized functions Add tests for getGeneration and requestDOMPermit Remove the environment setting from pr workflow Add new test for APPLICATIONS.P1S Add size workflow preset Reference the environment in the workflow Fix workflow event name Tests and workflows
- Loading branch information
Showing
6 changed files
with
7,290 additions
and
2,666 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Test and build PR | ||
on: [pull_request] | ||
jobs: | ||
build: | ||
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node: ['14.x'] | ||
os: [windows-latest, macOS-latest] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install deps and build (with cache) | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
env: | ||
DOMAIN_PROD_PREVIEW: ${{ secrets.DOMAIN_PROD_PREVIEW }} | ||
DOMAIN_PROD_DEVELOPER: ${{ secrets.DOMAIN_PROD_DEVELOPER }} | ||
DOMAIN_NUCWED: ${{ secrets.DOMAIN_NUCWED }} | ||
DOMAIN_AMP_PREVIEW: ${{ secrets.DOMAIN_AMP_PREVIEW }} | ||
|
||
run: npm test --ci --coverage --maxWorkers=2 | ||
|
||
- name: Build | ||
run: npm build | ||
size: | ||
runs-on: ubuntu-latest | ||
env: | ||
CI_JOB_NUMBER: 1 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: andresz1/size-limit-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,21 @@ A promise that resolves when the DOM is ready. On Presentation Layer documents t | |
|
||
A promise that resolves when Odyssey is finished loading. This will resolve with a reference to the Odyssey API. | ||
|
||
## Development | ||
|
||
This repo uses tsdx for development and np for releases. | ||
|
||
Everything you need should be in the npm scripts: | ||
|
||
```bash | ||
npm start | ||
npm test | ||
npm run release | ||
``` | ||
|
||
Running tests requires some environment variables be set. The canonical version of these env vars are stored as secrets in GitHub, but if you need them to run tests locally, chat to one of the authors listed below. | ||
|
||
## Authors | ||
|
||
- Colin Gourlay ([[email protected]](mailto:[email protected])) | ||
- Simon Elvery ([[email protected]](mailto:[email protected])) |
Oops, something went wrong.