Skip to content

Commit ff85814

Browse files
authored
Update project infrastructure (#1)
Converted repo to JourneyApps PowerSync patterns and CI
1 parent 67442ac commit ff85814

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4899
-5498
lines changed

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/brave-hairs-tan.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@powersync/mysql-zongji': minor
3+
---
4+
5+
Initial release of the powersync-mysql-zongji fork
6+
- Added custom gtid binlog event

.changeset/config.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.eslintrc

-19
This file was deleted.

.github/workflows/dev-packages.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Action to publish packages under the `next` tag for testing
2+
# Packages are versioned as `0.0.0-{tag}-DATETIMESTAMP`
3+
name: Create Dev Release
4+
5+
on:
6+
push:
7+
8+
jobs:
9+
publish:
10+
name: Publish Dev Packages
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
persist-credentials: false
16+
- name: Setup NodeJS
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version-file: '.nvmrc'
20+
- uses: pnpm/action-setup@v2
21+
name: Install pnpm
22+
with:
23+
version: 9
24+
run_install: false
25+
- name: Add NPM auth
26+
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
27+
- name: Get pnpm store directory
28+
shell: bash
29+
run: |
30+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
31+
- uses: actions/cache@v3
32+
name: Setup pnpm cache
33+
with:
34+
path: ${{ env.STORE_PATH }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
38+
- name: Install dependencies
39+
run: pnpm install
40+
- name: Version packages
41+
run: pnpm changeset version --no-git-tag --snapshot dev
42+
- name: Publish
43+
run: pnpm changeset publish --tag dev
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Release Packages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release-packages:
12+
name: Release Packages
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version-file: '.nvmrc'
22+
23+
- uses: pnpm/action-setup@v4
24+
name: Install pnpm
25+
with:
26+
version: 9
27+
run_install: false
28+
29+
- name: Get pnpm store directory
30+
shell: bash
31+
run: |
32+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
33+
34+
- uses: actions/cache@v3
35+
name: Setup pnpm cache
36+
with:
37+
path: ${{ env.STORE_PATH }}
38+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
39+
restore-keys: |
40+
${{ runner.os }}-pnpm-store-
41+
42+
- name: Add NPM auth
43+
run: |
44+
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
45+
46+
- name: Install dependencies
47+
run: pnpm install
48+
49+
- name: Create Release Pull Request or Publish to npm
50+
id: changesets
51+
uses: changesets/action@v1
52+
with:
53+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
54+
publish: pnpm release
55+
version: pnpm changeset version
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
60+
- name: Debug Outputs
61+
run: |
62+
echo "Published Packages: ${{ steps.changesets.outputs.publishedPackages }}"

.github/workflows/test.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Ensures packages test correctly
2+
name: Test Packages
3+
4+
on:
5+
push:
6+
7+
jobs:
8+
test:
9+
name: Test Packages
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
mysql-version: [ 8.0, 8.4 ]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
21+
22+
- name: Start MySQL
23+
run: |
24+
docker run \
25+
--name zongji_test \
26+
-e MYSQL_ROOT_PASSWORD=my_password \
27+
-p 3306:3306 \
28+
-d mysql:${{ matrix.mysql-version }} \
29+
--server-id=1 \
30+
--log-bin=/var/lib/mysql/mysql-bin.log \
31+
--binlog-format=row
32+
33+
- name: Setup NodeJS
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version-file: '.nvmrc'
37+
38+
- uses: pnpm/action-setup@v2
39+
name: Install pnpm
40+
with:
41+
version: 9
42+
run_install: false
43+
44+
- name: Get pnpm store directory
45+
shell: bash
46+
run: |
47+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
48+
49+
- uses: actions/cache@v3
50+
name: Setup pnpm cache
51+
with:
52+
path: ${{ env.STORE_PATH }}
53+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
54+
restore-keys: |
55+
${{ runner.os }}-pnpm-store-
56+
57+
- name: Install dependencies
58+
run: pnpm install
59+
60+
- name: Test
61+
run: pnpm test

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ npm-debug.log
1515
.DS_Store
1616
node_modules
1717
.idea
18+
.tap
1819
*.iml
1920
*~
2021
.\#*

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.12.2

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"useTabs": false,
6+
"printWidth": 120,
7+
"trailingComma": "none"
8+
}

.travis.yml

-15
This file was deleted.

0 commit comments

Comments
 (0)