Skip to content

feat(auth): refresh expired token instead of logout immediately #735

feat(auth): refresh expired token instead of logout immediately

feat(auth): refresh expired token instead of logout immediately #735

Workflow file for this run

name: Frontend Tests
on:
pull_request:
types: [ opened, synchronize ]
workflow_call:
inputs:
ref:
type: string
description: The branch, tag or SHA to deploy
required: true
jobs:
frontend_test:
name: Frontend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Checkout
uses: actions/checkout@v3
if: inputs.ref
with:
ref: ${{ inputs.ref }}
- name: Checkout
uses: actions/checkout@v3
if: github.event_name == 'pull_request'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Get npm cache directory
id: npm-cache-dir
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run test:ci
- run: npm run lint
- name: Archive code coverage result
if: success()
uses: actions/upload-artifact@v1
with:
name: deploy_coverage
path: frontend/coverage
- name: Upload code coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./frontend/coverage/cashbox-frontend/lcov.info
fail_ci_if_error: true