-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Worker has been rewritten to use Hono router and Cloudflare D1 storage with Drizzle ORM
- Loading branch information
1 parent
871c68e
commit a9c6ee3
Showing
29 changed files
with
4,842 additions
and
4,007 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,6 @@ jobs: | |
cypress-run: | ||
runs-on: ubuntu-latest | ||
services: | ||
dynamodb: | ||
image: amazon/dynamodb-local:latest | ||
ports: | ||
- 8000:8000 | ||
minio: | ||
image: bitnami/minio:latest | ||
env: | ||
|
@@ -22,7 +18,7 @@ jobs: | |
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16 | ||
node-version: 20 | ||
- name: Get cache directory | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
@@ -34,13 +30,6 @@ jobs: | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Create DynamoDB Table | ||
uses: giboow/action-aws-cli@v1 | ||
with: | ||
args: dynamodb --endpoint-url http://dynamodb:8000 create-table --region eu-west-1 --table-name vh7 --key-schema AttributeName=id,KeyType=HASH --attribute-definitions AttributeName=id,AttributeType=S --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 | ||
env: | ||
AWS_ACCESS_KEY_ID: testid | ||
AWS_SECRET_ACCESS_KEY: testkey | ||
- name: Create S3 Bucket | ||
uses: giboow/action-aws-cli@v1 | ||
with: | ||
|
@@ -62,10 +51,6 @@ jobs: | |
S3_DEFAULT_REGION: eu-west-1 | ||
S3_ENDPOINT_URL: http://localhost:9000 | ||
S3_BUCKET: vh7-uploads | ||
DYNAMODB_ACCESS_KEY_ID: testid | ||
DYNAMODB_SECRET_ACCESS_KEY: testkey | ||
DYNAMODB_TABLE: vh7 | ||
DYNAMODB_ENDPOINT_URL: http://localhost:8000 | ||
VH7_ENV: testing | ||
SENTRY_DSN: ${{ secrets.WORKER_SENTRY_DSN }} | ||
SENTRY_CLIENT_ID: ${{ secrets.WORKER_SENTRY_CLIENT_ID }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16 | ||
node-version: 20 | ||
- name: Get cache directory | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
@@ -27,16 +27,13 @@ jobs: | |
working-directory: ./worker | ||
run: | | ||
yarn install --dev | ||
yarn global add @cloudflare/wrangler | ||
yarn global add wrangler | ||
- name: Lint | ||
working-directory: ./worker | ||
run: yarn run lint | ||
# - name: Test | ||
# working-directory: ./worker | ||
# run: yarn run test | ||
- name: Build | ||
- name: Test | ||
working-directory: ./worker | ||
run: wrangler build | ||
run: yarn run test | ||
deploy: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,3 +208,4 @@ accessgrant.txt | |
cleanup/backup-* | ||
app/cypress/downloads | ||
cleanup/prod.env | ||
.wrangler |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
CREATE TABLE short_link_paste ( | ||
`short_link_id` text PRIMARY KEY NOT NULL, | ||
`code` text NOT NULL, | ||
`language` text, | ||
FOREIGN KEY (`short_link_id`) REFERENCES short_link(`id`) | ||
); | ||
|
||
CREATE TABLE short_link_upload ( | ||
`short_link_id` text PRIMARY KEY NOT NULL, | ||
`filename` text NOT NULL, | ||
`size` integer NOT NULL, | ||
`hash` text NOT NULL, | ||
FOREIGN KEY (`short_link_id`) REFERENCES short_link(`id`) | ||
); | ||
|
||
CREATE TABLE short_link_url ( | ||
`short_link_id` text PRIMARY KEY NOT NULL, | ||
`url` text NOT NULL, | ||
FOREIGN KEY (`short_link_id`) REFERENCES short_link(`id`) | ||
); | ||
|
||
CREATE TABLE short_link ( | ||
`id` text PRIMARY KEY NOT NULL, | ||
`created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, | ||
`updated_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, | ||
`expires_at` integer, | ||
`type` text NOT NULL | ||
); |
Oops, something went wrong.