Skip to content

Commit

Permalink
Test release version in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hayd committed Mar 29, 2020
1 parent 5975fa1 commit e3ee398
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -19,6 +19,11 @@ jobs:
docker cp extract:/src/runtime/deno-lambda-layer.zip deno-lambda-layer.zip
docker cp extract:/src/runtime/deno-lambda-example.zip deno-lambda-example.zip
gzip -9 amz-deno
- name: Verify Release Version Matches Deno Version
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'hayd/deno-lambda'
run: |
export DENO_LAMBDA_VERSION=$(echo $GITHUB_REF | tr / '\n' | tail -n 1)
docker run -e DENO_LAMBDA_VERSION=$DENO_LAMBDA_VERSION test-runner test --allow-env tests/version_check.ts
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'hayd/deno-lambda'
Expand Down
3 changes: 2 additions & 1 deletion tests/Dockerfile
Expand Up @@ -52,4 +52,5 @@ RUN deno fetch test.ts
ADD tests .


ENTRYPOINT ["deno", "test", "-A"]
ENTRYPOINT ["deno"]
CMD ["test", "-A"]
8 changes: 8 additions & 0 deletions tests/version_check.ts
@@ -0,0 +1,8 @@
import { assertEquals } from "./deps.ts";

Deno.test(function versionCheck() {
const v = Deno.env("DENO_LAMBDA_VERSION");
if (v !== undefined) {
assertEquals(v, Deno.version.deno);
}
});

0 comments on commit e3ee398

Please sign in to comment.