docs: use the static ref form in the signals example #205
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: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| quality: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 | |
| with: | |
| node-version: "24.15.0" | |
| - run: corepack enable | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm run format:check | |
| - run: pnpm run check | |
| - run: pnpm run test:coverage | |
| - run: pnpm run build | |
| - run: pnpm run pack:check | |
| - run: pnpm run test:package | |
| - run: pnpm run test:recovery | |
| - run: pnpm audit --audit-level=high | |
| floor: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 | |
| with: | |
| node-version: "24.4.0" | |
| - run: corepack enable | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm run test | |
| - run: pnpm run build | |
| - run: pnpm run test:package | |
| - run: pnpm run test:recovery | |
| postgresql: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| postgresql-version: ["14", "18"] | |
| services: | |
| postgres: | |
| image: postgres:${{ matrix.postgresql-version }} | |
| env: | |
| POSTGRES_USER: solid_objects | |
| POSTGRES_PASSWORD: solid_objects | |
| POSTGRES_DB: solid_objects_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U solid_objects" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| env: | |
| SOLID_OBJECTS_DATABASE_URL: postgresql://solid_objects:solid_objects@127.0.0.1:5432/solid_objects_test | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 | |
| with: | |
| node-version: "24.15.0" | |
| - run: corepack enable | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm run test:postgresql | |
| mysql: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mysql-version: ["8.0", "8.4"] | |
| services: | |
| mysql: | |
| image: mysql:${{ matrix.mysql-version }} | |
| env: | |
| MYSQL_ROOT_PASSWORD: solid_objects | |
| MYSQL_DATABASE: solid_objects_test | |
| MYSQL_USER: solid_objects | |
| MYSQL_PASSWORD: solid_objects | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd "mysqladmin ping -usolid_objects -psolid_objects --silent" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 20 | |
| env: | |
| SOLID_OBJECTS_DATABASE_URL: mysql://solid_objects:solid_objects@127.0.0.1:3306/solid_objects_test | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 | |
| with: | |
| node-version: "24.15.0" | |
| - run: corepack enable | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm run test:mysql | |
| browser: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 | |
| with: | |
| node-version: "24.15.0" | |
| - run: corepack enable | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm exec playwright install --with-deps chromium | |
| - run: pnpm run test:browser | |
| redis: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| services: | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| env: | |
| SOLID_OBJECTS_REDIS_URL: redis://127.0.0.1:6379 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 | |
| with: | |
| node-version: "24.15.0" | |
| - run: corepack enable | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm run test:redis | |
| publish: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [quality, floor, postgresql, mysql, browser, redis] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 | |
| with: | |
| node-version: "24.15.0" | |
| registry-url: "https://registry.npmjs.org" | |
| package-manager-cache: false | |
| - run: corepack enable | |
| - run: pnpm install --frozen-lockfile | |
| - run: npm install --global npm@11 | |
| - name: Validate release tag | |
| id: release | |
| run: | | |
| package_version=$(node --print "require('./package.json').version") | |
| tag_version=${GITHUB_REF_NAME#v} | |
| if [ "$tag_version" != "$package_version" ]; then | |
| echo "Tag $GITHUB_REF_NAME does not match package version $package_version" >&2 | |
| exit 1 | |
| fi | |
| echo "specifier=solid-objects@$package_version" >> "$GITHUB_OUTPUT" | |
| - name: Check npm registry | |
| id: registry | |
| run: | | |
| if npm view "${{ steps.release.outputs.specifier }}" version >/dev/null 2>&1; then | |
| echo "exists=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "exists=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - if: steps.registry.outputs.exists != 'true' | |
| run: npm publish --access public | |
| - name: Write release notes | |
| run: node scripts/release-notes.mjs "${GITHUB_REF_NAME#v}" > "${RUNNER_TEMP}/release-notes.md" | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 | |
| with: | |
| name: ${{ github.ref_name }} | |
| body_path: ${{ runner.temp }}/release-notes.md |