chore: update README and example with custom storage and sessionStora… #13
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: CI | |
on: | |
push: | |
branches: [ master, github-action, develop] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
if: "!contains(toJSON(github.event.commits.*.message), '[skip-ci]')" | |
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
# - macos-latest | |
# - windows-latest | |
node_version: [ 10.x, 12.x, 13.x, 14.x, 15.x, 16.x, 18.x, 19.x, 20.x, 21.x, 22.x ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Restore packages | |
uses: actions/cache@v2 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Copy package.json compatible with node version | |
run: | | |
if [[ ${{ matrix.node_version }} == 10* ]]; then | |
cp ci-package.json package.json | |
elif [[ ${{ matrix.node_version }} == 12* ]]; then | |
cp ci-package.json package.json | |
elif [[ ${{ matrix.node_version }} == 13* ]]; then | |
cp ci-package.json package.json | |
elif [[ ${{ matrix.node_version }} == 14* ]]; then | |
cp ci-package.json package.json | |
elif [[ ${{ matrix.node_version }} == 15* ]]; then | |
cp ci-package.json package.json | |
elif [[ ${{ matrix.node_version }} == 16* ]]; then | |
cp ci-package.json package.json | |
elif [[ ${{ matrix.node_version }} == 19* ]]; then | |
cp ci-package.json package.json | |
fi | |
- name: Install dependencies and run tests with coverage | |
run: | | |
yarn install | |
yarn test:coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: ${{ runner.os }} |