Merge pull request #116 from endojs/115-drop-max-len #125
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
name: Test all Packages | |
# run CI on pushes to main, and on all PRs (even the ones that target other | |
# branches) | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
# set ESM_DISABLE_CACHE=true (will be JSON parsed) | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['18.x'] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- run: yarn install | |
- run: yarn build | |
- name: cache build outputs | |
uses: actions/cache@v3 | |
with: | |
path: . | |
key: ${{ runner.os }}-${{ matrix.node-version }}-built-${{ github.sha }} | |
lint: | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['18.x'] | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# BEGIN-RESTORE-BOILERPLATE | |
- name: restore built files | |
id: built | |
uses: actions/cache@v3 | |
with: | |
path: . | |
key: ${{ runner.os }}-${{ matrix.node-version }}-built-${{ github.sha }} | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
if: steps.built.outputs.cache-hit != 'true' | |
- run: yarn install | |
if: steps.built.outputs.cache-hit != 'true' | |
- run: yarn build | |
if: steps.built.outputs.cache-hit != 'true' | |
# END-RESTORE-BOILERPLATE | |
- run: yarn lint | |
test: | |
# BEGIN-TEST-BOILERPLATE | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['18.x'] | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# END-TEST-BOILERPLATE | |
# BEGIN-RESTORE-BOILERPLATE | |
- name: restore built files | |
id: built | |
uses: actions/cache@v3 | |
with: | |
path: . | |
key: ${{ runner.os }}-${{ matrix.node-version }}-built-${{ github.sha }} | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
if: steps.built.outputs.cache-hit != 'true' | |
- run: yarn install | |
if: steps.built.outputs.cache-hit != 'true' | |
- run: yarn build | |
if: steps.built.outputs.cache-hit != 'true' | |
# END-RESTORE-BOILERPLATE | |
- run: yarn test |