Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* '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
drzax committed Mar 9, 2021
2 parents af34cb1 + c5d9076 commit b3ffc56
Show file tree
Hide file tree
Showing 6 changed files with 7,290 additions and 2,666 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/pr.yaml
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 }}
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Loading

0 comments on commit b3ffc56

Please sign in to comment.