chore: bring chage of master #183
Workflow file for this run
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: | |
| - v1 | |
| - next | |
| pull_request: | |
| branches: | |
| - v1 | |
| - next | |
| permissions: | |
| contents: read | |
| # Cancel in progress workflows | |
| # in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run | |
| concurrency: | |
| group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install dependencies | |
| run: npm install --ignore-scripts --include=dev | |
| - name: Run lint | |
| run: npm run lint | |
| performance: | |
| name: Run performance test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js 22 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run performance test | |
| run: npm run test:performance | |
| test: | |
| name: Run tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| node-version: ["18.0.0", 18, 19, 20, 21, 22, 23, 24, 25] | |
| exclude: | |
| # Skip: node-gyp build failure of "iconv" devDependency on Windows with Node 18.0.0 | |
| - os: windows-latest | |
| node-version: "18.0.0" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Npm version fixes | |
| if: ${{matrix.npm-version != ''}} | |
| run: npm install -g ${{ matrix.npm-version }} | |
| - name: Configure npm loglevel | |
| run: | | |
| npm config set loglevel error | |
| shell: bash | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Output Node and NPM versions | |
| run: | | |
| echo "Node.js version: $(node -v)" | |
| echo "NPM version: $(npm -v)" | |
| - name: Run tests | |
| shell: bash | |
| run: npm run test:ci | |
| - name: Run Web test | |
| shell: bash | |
| run: npm run test:node-web | |
| - name: Upload code coverage | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: coverage-node-${{ matrix.node-version }}-${{ matrix.os }} | |
| path: ./coverage/lcov.info | |
| retention-days: 1 | |
| coverage: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install lcov | |
| shell: bash | |
| run: sudo apt-get -y install lcov | |
| - name: Collect coverage reports | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: ./coverage | |
| pattern: coverage-node-* | |
| - name: Merge coverage reports | |
| shell: bash | |
| run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info | |
| - name: Upload coverage report | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| file: ./lcov.info | |
| test_webpack: | |
| name: Run tests webpack | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ["18", "*"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Webpack test | |
| shell: bash | |
| run: | | |
| npm run test:webpack | |
| test_typescript: | |
| needs: | |
| - lint | |
| - coverage | |
| runs-on: 'ubuntu-latest' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: Install | |
| run: | | |
| npm install --ignore-scripts | |
| - name: Run typescript tests | |
| run: npm run test:typescript |