Update all fix bundle #10
This file contains hidden or 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: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: | |
| - "**/*.md" | |
| - "LICENSE" | |
| - ".gitignore" | |
| - ".husky/**" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout (full history for SPDX year ranges) | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci || npm i | |
| # If you prefer hardcoding owner/start, keep your old command. | |
| # Here we rely on package.json "config" or env vars (COPYRIGHT_OWNER, COPYRIGHT_START, SPDX_ID) | |
| - name: Check SPDX headers | |
| run: node tools/copyright-headers.mjs --check | |
| - name: Lint | |
| run: npm run lint -- --ext .js,.jsx | |
| - name: Tests | |
| env: | |
| CI: true | |
| run: npm run test:ci | |
| - name: Build (CRA) | |
| env: | |
| CI: true | |
| REACT_APP_APP_NAME: AspectReact Store | |
| REACT_APP_DEFAULT_LOCALE: ${{ vars.REACT_APP_DEFAULT_LOCALE || 'en-US' }} | |
| REACT_APP_CURRENCY: ${{ vars.REACT_APP_CURRENCY || 'USD' }} | |
| REACT_APP_ENABLE_TOASTS: ${{ vars.REACT_APP_ENABLE_TOASTS || 'true' }} | |
| REACT_APP_AUTH_MODE: ${{ vars.REACT_APP_AUTH_MODE || 'none' }} | |
| REACT_APP_API_BASE_URL: ${{ vars.REACT_APP_API_BASE_URL || '' }} | |
| REACT_APP_AUTH0_DOMAIN: ${{ secrets.REACT_APP_AUTH0_DOMAIN }} | |
| REACT_APP_AUTH0_CLIENT_ID: ${{ secrets.REACT_APP_AUTH0_CLIENT_ID }} | |
| REACT_APP_SUPPORT_EMAIL: ${{ vars.REACT_APP_SUPPORT_EMAIL || 'support@yourdomain.com' }} | |
| run: npm run build | |
| - name: Upload production build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build | |
| path: build | |
| retention-days: 7 |