Skip to content

use useSessionStorage hook #2630

use useSessionStorage hook

use useSessionStorage hook #2630

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Lint and Test
on:
pull_request:
branches:
- main
- develop
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.15.1
cache: yarn
- name: Install
run: yarn install --immutable
- name: Build
run: yarn run build
env:
ADOBE_ANALYTICS_URL: ${{ secrets.ADOBE_ANALYTICS_URL }}
- name: Lint
run: yarn run lint
- name: Run Unit Tests and Coverage
run: yarn run test:ci
# - name: Extract branch name
# shell: bash
# run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
# id: extract_branch
# - name: Deploy Coverage Report 🚀
# uses: JamesIves/[email protected]
# with:
# TARGET_FOLDER: ${{ steps.extract_branch.outputs.branch }}/coverage
# BRANCH: gh-pages # The branch the action should deploy to.
# FOLDER: coverage
# - name: Find Comment
# if: steps.extract_branch.outputs.branch != 'main'
# uses: peter-evans/find-comment@v1
# id: fc
# with:
# issue-number: ${{ github.event.pull_request.number }}
# comment-author: 'github-actions[bot]'
# body-includes: |
# Jest Coverage Report Link for Branch
# https://dts-stn.github.io/${{ github.event.pull_request.base.repo.name }}/${{ steps.extract_branch.outputs.branch }}/coverage/lcov-report
# - name: Create or update comment # comment in pull request
# if: steps.extract_branch.outputs.branch != 'main'
# uses: peter-evans/create-or-update-comment@v1
# with:
# comment-id: ${{ steps.fc.outputs.comment-id }}
# issue-number: ${{ github.event.pull_request.number }}
# body: |
# Jest Coverage Report Link for Branch
# https://dts-stn.github.io/${{ github.event.pull_request.base.repo.name }}/${{ steps.extract_branch.outputs.branch }}/coverage/lcov-report
# edit-mode: replace