Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update serverless-example dependencies and test in CI
As an additional job (rather than as another .yml file)
- Loading branch information
Showing
8 changed files
with
58 additions
and
19 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
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,20 @@ | ||
name: Test | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: denolib/setup-deno@v1.2.0 | ||
with: | ||
deno-version: 0.37.0 | ||
- name: start a local dynamodb | ||
run: | | ||
mkdir dyno | ||
curl -q https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz | tar --directory=dyno -zxf - | ||
java -D"java.library.path=$DIR/DynamoDBLocal_lib" -jar "dyno/DynamoDBLocal.jar" -sharedDb & | ||
sleep 4.2 | ||
- name: run serverless tests | ||
working-directory: example-serverless | ||
run: | | ||
AWS_ACCESS_KEY_ID=fakeMyKeyId AWS_SECRET_ACCESS_KEY=fakeSecretAccessKey AWS_DEFAULT_REGION=local deno test --allow-env --allow-net 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
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,11 +1,3 @@ | ||
import { DynamoDBClient, createClient } from "./deps.ts"; | ||
|
||
const conf = { | ||
accessKeyId: Deno.env("AWS_ACCESS_KEY_ID"), | ||
secretAccessKey: Deno.env("AWS_SECRET_ACCESS_KEY"), | ||
sessionToken: () => Deno.env("AWS_SESSION_TOKEN"), | ||
region: Deno.env("AWS_REGION") || "local", | ||
port: Deno.env("AWS_REGION") ? 443 : 8000 | ||
}; | ||
|
||
export const client: DynamoDBClient = createClient(conf); | ||
export const client: DynamoDBClient = createClient(); |
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
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,5 +1,7 @@ | ||
export { assert, | ||
assertEquals } from "https://deno.land/std@v0.37.0/testing/asserts.ts"; | ||
export { | ||
assert, | ||
assertEquals | ||
} from "https://deno.land/std@v0.37.0/testing/asserts.ts"; | ||
export { | ||
serve | ||
} from "https://deno.land/std@v0.37.0/http/server.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