UNPKG

fast-uri

Version:

Dependency-free RFC 3986 URI toolbox

155 lines (132 loc) • 4.18 kB
name: CI on: push: branches: - main - next - 'v*' paths-ignore: - 'docs/**' - '*.md' pull_request: paths-ignore: - 'docs/**' - '*.md' # This allows a subsequently queued workflow run to interrupt previous runs concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" cancel-in-progress: true permissions: contents: read jobs: type-tests: name: Type Tests runs-on: ubuntu-latest strategy: matrix: node-version: ['20', '22', '24', '26'] steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: ${{ matrix.node-version }} cache: 'npm' cache-dependency-path: package.json check-latest: true - name: Install dependencies run: npm install --ignore-scripts - name: Run type tests run: npm run test:typescript unit-tests: name: Unit Tests runs-on: ubuntu-latest strategy: matrix: node-version: ['16', '18', '20', '22', '24', '26'] steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: ${{ matrix.node-version }} cache: 'npm' cache-dependency-path: package.json check-latest: true - name: Install dependencies run: npm install --ignore-scripts - name: Run unit tests run: npm test test-regression-check-node10: name: Test compatibility with Node.js 10 runs-on: ubuntu-latest permissions: contents: read steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: '10' cache: 'npm' cache-dependency-path: package.json check-latest: true - name: Install run: | npm install --ignore-scripts - name: Copy project as fast-uri to node_node_modules run: | rm -rf ./node_modules/fast-uri/lib && rm -rf ./node_modules/fast-uri/index.js && cp -r ./lib ./node_modules/fast-uri/lib && cp ./index.js ./node_modules/fast-uri/index.js - name: Run tests run: | npm run test:unit env: NODE_OPTIONS: no-network-family-autoselection test-browser: name: Test browser compatibility runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] browser: ['chromium', 'firefox', 'webkit'] exclude: - os: ubuntu-latest browser: webkit permissions: contents: read steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: '24' cache: 'npm' cache-dependency-path: package.json check-latest: true - name: Install dependencies run: | npm install --ignore-scripts - if: ${{ matrix.os == 'windows-latest' }} run: npx playwright install winldd - name: Run browser tests run: | npm run test:browser:${{ matrix.browser }} test: needs: - test-regression-check-node10 permissions: contents: write pull-requests: write uses: fastify/workflows/.github/workflows/plugins-ci.yml@ef591e2186785d5ab36b9fe6a79c7ce2f1d94e57 # v7.0.0 with: license-check: true lint: true node-versions: '["16", "18", "20", "22", "24", "26"]'