-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit b62724e.
- Loading branch information
1 parent
b62724e
commit e9da7ca
Showing
63 changed files
with
1,955 additions
and
3,005 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 |
---|---|---|
@@ -1,64 +1,69 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
DENO_VERSION: vx.x.x | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
check: | ||
name: Check format and lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install deno | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{env.DENO_VERSION}} | ||
|
||
- name: Check | ||
run: deno task check | ||
|
||
tests: | ||
name: Run tests | ||
fmt: | ||
runs-on: ubuntu-latest | ||
|
||
continue-on-error: true | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install deno | ||
- uses: actions/checkout@v1 | ||
- name: Install Deno 1.x | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{env.DENO_VERSION}} | ||
|
||
- name: Test | ||
run: deno task test:ga | ||
|
||
publish: | ||
deno-version: v1.x | ||
- name: Check fmt | ||
run: deno fmt --check | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
DENO_VERSION: | ||
- v1.x | ||
DB_VERSION: | ||
- mysql:5.5 | ||
- mysql:5.6 | ||
- mysql:5.7 | ||
- mysql:8 | ||
- mysql:latest | ||
- mariadb:5.5 | ||
- mariadb:10.0 | ||
- mariadb:10.1 | ||
- mariadb:10.2 | ||
- mariadb:10.3 | ||
- mariadb:10.4 | ||
# - mariadb:latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install deno | ||
- uses: actions/checkout@v1 | ||
- name: Install Deno ${{ matrix.DENO_VERSION }} | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{env.DENO_VERSION}} | ||
|
||
- name: Publish (dry run) | ||
run: deno publish --dry-run | ||
deno-version: ${{ matrix.DENO_VERSION }} | ||
- name: Show Deno version | ||
run: deno --version | ||
- name: Start ${{ matrix.DB_VERSION }} | ||
run: | | ||
sudo mkdir -p /var/run/mysqld/tmp | ||
sudo chmod -R 777 /var/run/mysqld | ||
docker container run --name mysql --rm -d -p 3306:3306 \ | ||
-v /var/run/mysqld:/var/run/mysqld \ | ||
-v /var/run/mysqld/tmp:/tmp \ | ||
-e MYSQL_ROOT_PASSWORD=root \ | ||
${{ matrix.DB_VERSION }} | ||
./.github/workflows/wait-for-mysql.sh | ||
- name: Run tests (TCP) | ||
run: | | ||
deno test --allow-env --allow-net=127.0.0.1:3306 ./test.ts | ||
- name: Run tests (--unstable) (UNIX domain socket) | ||
run: | | ||
SOCKPATH=/var/run/mysqld/mysqld.sock | ||
if [[ "${{ matrix.DB_VERSION }}" == "mysql:5.5" ]]; then | ||
SOCKPATH=/var/run/mysqld/tmp/mysql.sock | ||
fi | ||
echo "DROP USER 'root'@'localhost';" | docker exec -i mysql mysql -proot | ||
DB_SOCKPATH=$SOCKPATH TEST_METHODS=unix \ | ||
deno test --unstable --allow-env \ | ||
--allow-read=/var/run/mysqld/ --allow-write=/var/run/mysqld/ \ | ||
./test.ts |
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,23 @@ | ||
name: "publish current release to https://nest.land" | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
publishToNestDotLand: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: "setup" # check: https://github.com/actions/virtual-environments/issues/1777 | ||
uses: denolib/setup-deno@v2 | ||
with: | ||
deno-version: v1.4.6 | ||
|
||
- name: "check nest.land" | ||
run: | | ||
deno run --allow-net --allow-read --allow-run https://deno.land/x/cicd/publish-on-nest.land.ts ${{ secrets.GITHUB_TOKEN }} ${{ secrets.NESTAPIKEY }} ${{ github.repository }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
echo "Waiting for MySQL" | ||
for i in `seq 1 30`; | ||
do | ||
echo '\q' | mysql -h 127.0.0.1 -uroot --password=root -P 3306 && exit 0 | ||
>&2 echo "MySQL is waking up" | ||
sleep 1 | ||
done | ||
|
||
echo "Failed waiting for MySQL" && exit 1 |
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,5 +5,4 @@ mysql.log | |
docs | ||
.DS_Store | ||
.idea | ||
dbtmp | ||
tmp_test | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export type { Deferred } from "https://deno.land/std@0.104.0/async/mod.ts"; | ||
export { deferred, delay } from "https://deno.land/std@0.104.0/async/mod.ts"; | ||
export { format as byteFormat } from "https://deno.land/x/bytes_formater@v1.4.0/mod.ts"; | ||
export { createHash } from "https://deno.land/std@0.104.0/hash/mod.ts"; | ||
export { decode as base64Decode } from "https://deno.land/std@0.104.0/encoding/base64.ts"; | ||
export type { | ||
SupportedAlgorithm, | ||
} from "https://deno.land/std@0.104.0/hash/mod.ts"; | ||
export { replaceParams } from "https://deno.land/x/sql_builder@v1.9.1/util.ts"; | ||
export * as log from "https://deno.land/std@0.104.0/log/mod.ts"; |
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,10 @@ | ||
{ | ||
"name": "mysql", | ||
"description": "MySQL driver for Deno", | ||
"homepage": "https://github.com/manyuanrong/deno_mysql", | ||
"files": [ | ||
"./**/*.ts", | ||
"README.md" | ||
], | ||
"entry": "./mod.ts" | ||
} |
Oops, something went wrong.