Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{".":"0.21.4"}
{ ".": "0.21.4" }
31 changes: 14 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Build and Publish to jsr
name: Build and Publish to npm

on:
release:
types: [published]

permissions:
id-token: write
contents: read

jobs:
Expand All @@ -17,31 +16,29 @@ jobs:
with:
token: ${{ secrets.FLOWCORE_MACHINE_GITHUB_TOKEN }}
submodules: true
- name: Extract version from deno.json
- name: Extract version from package.json
uses: sergeysova/jq-action@v2
id: version
with:
cmd: "jq .version deno.json -r"
cmd: "jq .version package.json -r"
- name: Show my version
run: 'echo "version ${{ steps.version.outputs.value }}"'

- name: Setup Deno2 environment
uses: denoland/setup-deno@v2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
deno-version: v2.x
- name: Deno install
run: deno install --frozen-lockfile
bun-version: 1.3.14
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: deno lint
- name: Publish to JSR
run: deno publish
run: bun run lint
- name: Build for NPM
run: deno run -A bin/build-npm.ts
- uses: actions/setup-node@v4
run: bun run build
- uses: useblacksmith/setup-node@v5
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Update npm
run: npm install -g npm@latest
- name: Publish to NPM
run: ( cd npm && npm publish --access public --provenance=false )
run: npm publish --access public --provenance=false
2 changes: 1 addition & 1 deletion .github/workflows/release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"extra-files": [
{
"type": "json",
"path": "deno.json",
"path": "package.json",
"jsonpath": "$.version"
}
]
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,29 @@ on:
- main

env:
NODE_VERSION: ">=18.12.1"
BUN_VERSION: "1.3.14"

name: release-please
jobs:
release-please:
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- name: Extract package name from deno.json
- name: Extract package name from package.json
uses: sergeysova/jq-action@v2
id: package
with:
cmd: "jq .name deno.json -r"
- name: Setup Deno2 environment
uses: denoland/setup-deno@v2
cmd: "jq .name package.json -r"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
deno-version: v2.x
- name: Deno install
run: deno install --frozen-lockfile
bun-version: ${{ env.BUN_VERSION }}
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Show package name
run: 'echo "version ${{ steps.package.outputs.value }}"'
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.FLOWCORE_MACHINE_GITHUB_TOKEN }}
config-file: .github/workflows/release-please-config.json
manifest-file: .github/workflows/.release-please-manifest.json

48 changes: 23 additions & 25 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ on:
branches-ignore: ["main"]

env:
NODE_VERSION: ">=18.12.1"
BUN_VERSION: "1.3.14"

permissions:
id-token: write
contents: read

jobs:
Expand All @@ -20,29 +19,31 @@ jobs:
with:
token: ${{ secrets.FLOWCORE_MACHINE_GITHUB_TOKEN }}
submodules: true
- name: Extract version from deno.json
- name: Extract version from package.json
uses: sergeysova/jq-action@v2
id: version
with:
cmd: "jq .version deno.json -r"
cmd: "jq .version package.json -r"

- name: Show my version
run: 'echo "version ${{ steps.version.outputs.value }}"'

- name: Setup Deno2 environment
uses: denoland/setup-deno@v2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
deno-version: v2.x
- name: Deno install
run: deno install --frozen-lockfile
bun-version: ${{ env.BUN_VERSION }}
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: deno lint
- name: Format
run: deno fmt
run: bun run lint
- name: Format check
run: bun run format:check
- name: Type check
run: bun run typecheck
- name: Test
run: deno test -A
- name: Validate NPM build
run: deno run -A bin/build-npm.ts
run: bun test
- name: Build
run: bun run build

integration-test:
runs-on: blacksmith-4vcpu-ubuntu-2204
Expand All @@ -52,29 +53,26 @@ jobs:
with:
token: ${{ secrets.FLOWCORE_MACHINE_GITHUB_TOKEN }}
submodules: true
- name: Setup Deno2
uses: denoland/setup-deno@v2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
deno-version: v2.x
bun-version: ${{ env.BUN_VERSION }}
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Install Docker
run: |
if ! command -v docker &>/dev/null; then
curl -fsSL https://get.docker.com | sh
fi
docker version
- name: Install k3d
run: curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- name: Run integration tests
run: bash integration/run-integration.sh
- name: Collect logs on failure
if: failure()
run: |
export PATH="$PWD/.cache/bin:$PATH"
kubectl logs -n data-pump-integration-test -l app=data-pump-test --tail=200 || true
kubectl logs -n data-pump-integration-test -l app=postgres --tail=100 || true
- name: Teardown
if: always()
run: bash integration/scripts/teardown.sh || true
run: PATH="$PWD/.cache/bin:$PATH" bash integration/scripts/teardown.sh || true
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
tmp/
.env
.DS_Store
.cache/
src/local/
npm/
node_modules/
dist/
coverage/

src/test/
src/test/
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
CHANGELOG.md
handoff.md
bun.lock
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"semi": false,
"trailingComma": "all"
}
Loading
Loading