fix: mark one more service-specific error as known #163
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: TS tests | |
| on: | |
| push: | |
| branches: ['main'] | |
| paths-ignore: | |
| - 'website/**' | |
| - '**/README.md' | |
| - 'integration-tests/**' | |
| pull_request: | |
| paths-ignore: | |
| - 'website/**' | |
| - '**/README.md' | |
| - 'integration-tests/**' | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| list_ts_packages_and_examples: | |
| name: List TS packages and examples | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| outputs: | |
| package_directories: ${{ steps.list_ts_packages.outputs.directories }} | |
| example_names: ${{ steps.list_examples.outputs.example_names }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: echo "directories=`find packages/ -mindepth 1 -maxdepth 1 -type d -exec test -e '{}'/tsconfig.json \; -print | jq -R -s -c 'split("\n")[:-1]'`" >> $GITHUB_OUTPUT | |
| id: list_ts_packages | |
| - run: echo "example_names=$(find examples/ -mindepth 1 -maxdepth 2 -type f -name package.json | xargs dirname | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
| id: list_examples | |
| typecheck_packages: | |
| name: Build and typecheck ${{ matrix.package_dir }} | |
| needs: [list_ts_packages_and_examples] | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package_dir: ${{ fromJson(needs.list_ts_packages_and_examples.outputs.package_directories) }} | |
| defaults: | |
| run: | |
| working-directory: ${{ matrix.package_dir }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.tool-versions' | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm -r --filter "$(jq '.name' -r package.json)^..." build | |
| - run: pnpm run typecheck | |
| ensure_sync_service_image: | |
| uses: ./.github/workflows/ensure_sync_service_image.yml | |
| build_and_test_packages: | |
| name: 'Test ${{ matrix.package_dir }} w/ sync-service' | |
| needs: [list_ts_packages_and_examples, ensure_sync_service_image] | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package_dir: ${{ fromJson(needs.list_ts_packages_and_examples.outputs.package_directories) }} | |
| defaults: | |
| run: | |
| working-directory: ${{ matrix.package_dir }} | |
| env: | |
| ELECTRIC_IMAGE: ${{ needs.ensure_sync_service_image.outputs.image }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.tool-versions' | |
| cache: pnpm | |
| - name: Install Node dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Node dependencies, if any | |
| run: pnpm -r --filter "$(jq '.name' -r package.json)^..." build | |
| - name: Run Postgres, Electric and nginx for the subsequent test suite | |
| working-directory: packages/sync-service/dev | |
| run: | | |
| docker compose -f docker-compose.yml -f docker-compose-electric.yml up --wait postgres electric nginx | |
| - name: Run tests with coverage | |
| run: pnpm run coverage --run | |
| - name: Upload coverage reports to CodeCov | |
| uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: typescript,unit-tests,${{ matrix.package_dir }} | |
| - name: Upload test results to CodeCov | |
| uses: codecov/test-results-action@f2dba722c67b86c6caa034178c6e4d35335f6706 | |
| if: ${{ !cancelled() }} | |
| env: | |
| DUMMY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}-dummy | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| flags: typescript,unit-tests,${{ matrix.package_dir }} | |
| files: ./junit/test-report.junit.xml | |
| check_and_build_examples: | |
| name: Check and build ${{ matrix.example_folder }} | |
| needs: [list_ts_packages_and_examples, build_and_test_packages] | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example_folder: ${{ fromJson(needs.list_ts_packages_and_examples.outputs.example_names) }} | |
| defaults: | |
| run: | |
| working-directory: ${{ matrix.example_folder }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.tool-versions' | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm -r --filter "$(jq '.name' -r package.json)^..." build | |
| - run: pnpm --if-present run prepare | |
| - run: pnpm --if-present run typecheck | |
| - run: pnpm --if-present run build | |
| - run: pnpm --if-present run test --run |