✨ Implement arbitrary for ulid #7536
Workflow file for this run
This file contains 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: Build Status | |
on: | |
push: | |
branches: | |
- main | |
- 'next-*_*_*' | |
- 'fix-v*' | |
pull_request: | |
branches: | |
- main | |
- 'next-*_*_*' | |
- 'fix-v*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
# Root jobs | |
warmup_yarn_cache: | |
name: 'Warm up Yarn cache' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
id: yarn-cache | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Update Yarn cache | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
env: | |
# Using PNP linker for better performance | |
YARN_NODE_LINKER: pnp | |
run: yarn install --immutable | |
warmup_yarn_cache_others: | |
name: 'Warm up Yarn cache (others)' | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: ['macos-latest', 'windows-latest'] | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
id: yarn-cache | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Update Yarn cache | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
env: | |
# Using PNP linker for better performance | |
YARN_NODE_LINKER: pnp | |
run: yarn install --immutable | |
no_dedupe_required: | |
name: 'No dedupe required' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
- name: Ensure no dedupe required | |
run: yarn dedupe --check | |
all_version_bump_declared: | |
name: 'All version bump declared' | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'renovate[bot]' | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
- name: Ensure versions have been properly bumped | |
run: yarn version check | |
package_quality: | |
name: 'Package quality' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
- name: Check package score using skypack | |
run: cd packages/fast-check && yarn dlx @skypack/package-check | |
# Jobs requesting warmup_yarn_cache | |
format_lint: | |
name: 'Format & Lint' | |
needs: warmup_yarn_cache | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn workspace @fast-check/monorepo install --immutable | |
- name: Check format | |
run: yarn format:check | |
- name: Check lint | |
run: yarn lint:check | |
production_packages: | |
name: 'Build production packages' | |
needs: warmup_yarn_cache | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build production packages | |
run: yarn build-ci:all | |
- name: Create bundles | |
run: yarn pack:all | |
- name: Upload production packages | |
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
with: | |
name: bundles | |
path: packages/**/package.tgz | |
if-no-files-found: error | |
retention-days: 1 | |
# Jobs requesting warmup_yarn_cache AND production_packages | |
typecheck: | |
name: 'Typecheck' | |
needs: | |
- warmup_yarn_cache | |
- production_packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Unpack production packages | |
run: yarn unpack:all | |
- name: Typecheck | |
run: yarn workspaces foreach -pvi run typecheck | |
test: | |
name: 'Test' | |
needs: | |
- warmup_yarn_cache | |
- warmup_yarn_cache_others | |
- production_packages | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
package-name: | |
- 'fast-check' | |
- '@fast-check/ava' | |
- '@fast-check/jest' | |
- '@fast-check/packaged' | |
- '@fast-check/poisoning' | |
- '@fast-check/vitest' | |
- '@fast-check/worker' | |
script-name: ['test'] | |
node-version: [14.x, 16.x, 18.x, latest] | |
os: ['ubuntu-latest'] | |
include: | |
# More platforms and scripts... | |
- package-name: 'fast-check' | |
script-name: 'e2e' | |
node-version: 18.x | |
os: 'ubuntu-latest' | |
- package-name: 'fast-check' | |
script-name: 'e2e' | |
node-version: 18.x | |
os: 'macos-latest' | |
- package-name: 'fast-check' | |
script-name: 'e2e' | |
node-version: 18.x | |
os: 'windows-latest' | |
- package-name: '@fast-check/packaged' | |
script-name: 'test' | |
node-version: 18.x | |
os: 'macos-latest' | |
- package-name: '@fast-check/packaged' | |
script-name: 'test' | |
node-version: 18.x | |
os: 'windows-latest' | |
# Limited matrix for test only packages | |
- package-name: '@fast-check/examples' | |
script-name: 'test' | |
node-version: 18.x | |
os: 'ubuntu-latest' | |
- package-name: 'website' | |
script-name: 'test' | |
node-version: 18.x | |
os: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Cache for Jest | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
with: | |
path: /tmp/jest_rt | |
key: '${{matrix.package-name}}-${{matrix.script-name}}-${{runner.os}}-${{matrix.node-version}}-jest-test' | |
- name: Using Node v${{matrix.node-version}} | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: ${{matrix.node-version}} | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Unpack production packages | |
run: yarn unpack:all | |
- name: Alter internals to behave as if published | |
run: yarn workspaces foreach -pRvi --from '${{matrix.package-name}}' --no-private --exclude '${{matrix.package-name}}' exec yarn node $(yarn bin packaged) --keep-node-modules | |
- name: Unit tests | |
shell: bash -l {0} | |
# The DEFAULT_SEED might be used by some of the packages and might be ignored by others | |
# It's aim is to help to diagnose infinite loop that may occur during tests and cannot be stopped by fast-check itself | |
run: | | |
export EXPECT_DEFAULT_SEED="true" | |
export DEFAULT_SEED=$(node -p "Date.now() ^ (Math.random() * 0x100000000)") | |
echo "DEFAULT_SEED is: ${DEFAULT_SEED}" | |
yarn workspace '${{matrix.package-name}}' '${{matrix.script-name}}' | |
- name: Codecov | |
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 | |
if: matrix.package-name == 'fast-check' && matrix.script-name == 'test' | |
with: | |
name: unit-tests-${{matrix.node-version}}-${{runner.os}} | |
flags: unit-tests, unit-tests-${{matrix.node-version}}-${{runner.os}} | |
fail_ci_if_error: false # default: false | |
verbose: false # default: false | |
documentation: | |
name: 'Build documentation' | |
needs: | |
- warmup_yarn_cache | |
- production_packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
lfs: true | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Unpack production packages | |
run: yarn unpack:all | |
- name: Generate documentation | |
run: yarn workspace website build | |
- name: Generate API reference | |
run: yarn workspace fast-check docs-ci | |
- name: Copy API reference within documentation | |
run: mv packages/fast-check/docs website/build/api-reference | |
- name: Upload documentation | |
uses: actions/upload-pages-artifact@66b63f4a7de003f4f00cc8e9af4b83b8f2abdb96 # v1.0.9 | |
with: | |
path: website/build/ | |
test_bundle: | |
name: 'Test bundle' | |
needs: | |
- warmup_yarn_cache | |
- production_packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Unpack production packages | |
run: yarn unpack:all | |
- name: Alter internals to behave as if published | |
run: yarn workspaces foreach -pvi --no-private exec yarn node $(yarn bin packaged) --keep-node-modules | |
- name: Retrieve potentially dropped test-bundle | |
run: yarn workspaces foreach -pvi --no-private exec "git restore -s@ -SW -- test-bundle || true" | |
- name: Check bundles | |
run: yarn workspaces foreach -pvi --no-private run test-bundle | |
- name: Check publication lint | |
run: yarn publint:all | |
test_types: | |
name: 'Test types' | |
needs: | |
- warmup_yarn_cache | |
- production_packages | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ts-version: | |
# Latest version of TypeScript | |
- '*' | |
# Various intermediate versions of Typescript | |
- '4.4' | |
# Minimal requirement for TypeScript | |
- '4.1' | |
# Other release channels for TypeScript | |
- 'rc' | |
- 'next' | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Unpack production packages | |
run: yarn unpack:all | |
- name: Alter internals to behave as if published | |
run: yarn workspaces foreach -pRvi --from '@fast-check/test-types' --no-private exec yarn node $(yarn bin packaged) --keep-node-modules | |
- name: Drop @types to avoid failures on legacy versions of TypeScript | |
if: matrix.ts-version == '4.1' | |
run: mv node_modules/@types node_modules/at-types | |
- name: Drop parse5 to avoid failures on legacy versions of TypeScript | |
if: matrix.ts-version == '4.4' | |
run: rm -rv node_modules/parse5 | |
- name: TypeScript version | |
run: | | |
cd packages/test-types | |
yarn dlx -p typescript@${{matrix.ts-version}} tsc --version | |
- name: Test packages/test-types/ | |
run: | | |
cd packages/test-types | |
yarn dlx -p typescript@${{matrix.ts-version}} tsc | |
- name: Test packages/test-types/ with --moduleResolution nodenext | |
if: matrix.ts-version == 'next' | |
run: | | |
cd packages/test-types | |
yarn dlx -p typescript@${{matrix.ts-version}} tsc --moduleResolution nodenext --module nodenext | |
- name: Test packages/test-types/ with --exactOptionalPropertyTypes | |
if: matrix.ts-version != '4.1' | |
run: | | |
cd packages/test-types | |
sed -i 's/fc-expect-error-require-exactOptionalPropertyTypes/ts-expect-error/g' *.ts | |
yarn dlx -p typescript@${{matrix.ts-version}} tsc --exactOptionalPropertyTypes | |
test_node_8: | |
name: 'Test legacy Node' | |
needs: | |
- warmup_yarn_cache | |
- production_packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Unpack production packages | |
run: yarn unpack:all | |
- name: Alter internals to behave as if published | |
run: yarn workspaces foreach -pRvi --from '@fast-check/test-minimal-support' --no-private exec yarn node $(yarn bin packaged) --keep-node-modules | |
- name: Using Node v8.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '8.x' | |
- name: Test packages/test-minimal-support/ | |
run: | | |
cd packages/test-minimal-support | |
node --version | |
node main.js | |
# Re-install node 16, for clean-up related logic as it does not work with node 8 | |
# The caching logic of actions/setup-node calls yarn to know the version | |
- name: Using Node v18.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '18.x' | |
# Publication jobs | |
publish_documentation: | |
name: 'Publish documentation' | |
needs: documentation | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
steps: | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@ee48c7b82e077d7b8ef30b50a719e6a792a50c9a # v2.0.2 | |
check_any_package: | |
name: 'Check publish any package' | |
needs: | |
- production_packages | |
- documentation | |
- format_lint | |
- no_dedupe_required | |
- package_quality | |
- typecheck | |
- test | |
- test_bundle | |
- test_node_8 | |
- test_types | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
outputs: | |
tag_count: ${{steps.tag_count.outputs.count}} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- id: tag_count | |
name: Check if one tag matches the package | |
run: | | |
echo -n "count=" >> "$GITHUB_OUTPUT" | |
git tag --points-at HEAD | wc -l >> "$GITHUB_OUTPUT" | |
check_publish_fc: | |
name: Check publish fast-check | |
needs: check_any_package | |
if: needs.check_any_package.outputs.tag_count != '0' | |
runs-on: ubuntu-latest | |
outputs: | |
status: ${{steps.check_has_tag.outcome}} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- id: check_has_tag | |
name: Check if one tag matches the package | |
run: git tag --points-at HEAD | grep '^v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' | |
continue-on-error: true | |
publish_package_fc: | |
name: Publish fast-check | |
needs: check_publish_fc | |
if: needs.check_publish_fc.outputs.status == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Using Node v20.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Publish fast-check | |
run: npm publish --provenance --access public packages/fast-check/package.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
check_publish_ava: | |
name: Check publish @fast-check/ava | |
needs: check_any_package | |
if: needs.check_any_package.outputs.tag_count != '0' | |
runs-on: ubuntu-latest | |
outputs: | |
status: ${{steps.check_has_tag.outcome}} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- id: check_has_tag | |
name: Check if one tag matches the package | |
run: git tag --points-at HEAD | grep '^ava/v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' | |
continue-on-error: true | |
publish_package_ava: | |
name: Publish @fast-check/ava | |
needs: check_publish_ava | |
if: needs.check_publish_ava.outputs.status == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Using Node v20.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Publish @fast-check/ava | |
run: npm publish --provenance --access public packages/ava/package.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
check_publish_jest: | |
name: Check publish @fast-check/jest | |
needs: check_any_package | |
if: needs.check_any_package.outputs.tag_count != '0' | |
runs-on: ubuntu-latest | |
outputs: | |
status: ${{steps.check_has_tag.outcome}} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- id: check_has_tag | |
name: Check if one tag matches the package | |
run: git tag --points-at HEAD | grep '^jest/v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' | |
continue-on-error: true | |
publish_package_jest: | |
name: Publish @fast-check/jest | |
needs: check_publish_jest | |
if: needs.check_publish_jest.outputs.status == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Using Node v20.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Publish @fast-check/jest | |
run: npm publish --provenance --access public packages/jest/package.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
check_publish_packaged: | |
name: Check publish @fast-check/packaged | |
needs: check_any_package | |
if: needs.check_any_package.outputs.tag_count != '0' | |
runs-on: ubuntu-latest | |
outputs: | |
status: ${{steps.check_has_tag.outcome}} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- id: check_has_tag | |
name: Check if one tag matches the package | |
run: git tag --points-at HEAD | grep '^packaged/v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' | |
continue-on-error: true | |
publish_package_packaged: | |
name: Publish @fast-check/packaged | |
needs: check_publish_packaged | |
if: needs.check_publish_packaged.outputs.status == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Using Node v20.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Publish @fast-check/packaged | |
run: npm publish --provenance --access public packages/packaged/package.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
check_publish_poisoning: | |
name: Check publish @fast-check/poisoning | |
needs: check_any_package | |
if: needs.check_any_package.outputs.tag_count != '0' | |
runs-on: ubuntu-latest | |
outputs: | |
status: ${{steps.check_has_tag.outcome}} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- id: check_has_tag | |
name: Check if one tag matches the package | |
run: git tag --points-at HEAD | grep '^poisoning/v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' | |
continue-on-error: true | |
publish_package_poisoning: | |
name: Publish @fast-check/poisoning | |
needs: check_publish_poisoning | |
if: needs.check_publish_poisoning.outputs.status == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Using Node v20.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Publish @fast-check/poisoning | |
run: npm publish --provenance --access public packages/poisoning/package.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
check_publish_vitest: | |
name: Check publish @fast-check/vitest | |
needs: check_any_package | |
if: needs.check_any_package.outputs.tag_count != '0' | |
runs-on: ubuntu-latest | |
outputs: | |
status: ${{steps.check_has_tag.outcome}} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- id: check_has_tag | |
name: Check if one tag matches the package | |
run: git tag --points-at HEAD | grep '^vitest/v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' | |
continue-on-error: true | |
publish_package_vitest: | |
name: Publish @fast-check/vitest | |
needs: check_publish_vitest | |
if: needs.check_publish_vitest.outputs.status == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Using Node v20.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Publish @fast-check/vitest | |
run: npm publish --provenance --access public packages/vitest/package.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
check_publish_worker: | |
name: Check publish @fast-check/worker | |
needs: check_any_package | |
if: needs.check_any_package.outputs.tag_count != '0' | |
runs-on: ubuntu-latest | |
outputs: | |
status: ${{steps.check_has_tag.outcome}} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- id: check_has_tag | |
name: Check if one tag matches the package | |
run: git tag --points-at HEAD | grep '^worker/v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' | |
continue-on-error: true | |
publish_package_worker: | |
name: Publish @fast-check/worker | |
needs: check_publish_worker | |
if: needs.check_publish_worker.outputs.status == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Using Node v20.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Publish @fast-check/worker | |
run: npm publish --provenance --access public packages/worker/package.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
check_publish_expect_type: | |
name: Check publish @fast-check/expect-type | |
needs: check_any_package | |
if: needs.check_any_package.outputs.tag_count != '0' | |
runs-on: ubuntu-latest | |
outputs: | |
status: ${{steps.check_has_tag.outcome}} | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- id: check_has_tag | |
name: Check if one tag matches the package | |
run: git tag --points-at HEAD | grep '^expect-type/v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' | |
continue-on-error: true | |
publish_package_expect_type: | |
name: Publish @fast-check/expect-type | |
needs: check_publish_expect_type | |
if: needs.check_publish_expect_type.outputs.status == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Using Node v20.x | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Download production packages | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: bundles | |
path: packages/ | |
- name: Publish @fast-check/expect-type | |
run: npm publish --provenance --access public packages/expect-type/package.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |