From 9f21cad5138a9d97305cc64eb27f650c283bd901 Mon Sep 17 00:00:00 2001 From: Daniel Lamando Date: Sat, 27 Nov 2021 13:32:44 +0100 Subject: [PATCH] Add basic CI --- .github/workflows/deno-ci.yaml | 43 ++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/deno-ci.yaml diff --git a/.github/workflows/deno-ci.yaml b/.github/workflows/deno-ci.yaml new file mode 100644 index 0000000..9ba97e3 --- /dev/null +++ b/.github/workflows/deno-ci.yaml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: {} + +jobs: + + check: + runs-on: ubuntu-latest + name: Check w/ ${{ matrix.deno-version }} + strategy: + matrix: + deno-version: + - v1.16 + - canary + fail-fast: false # run each branch to completion + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Use Deno ${{ matrix.deno-version }} + uses: denoland/setup-deno@v1 + with: + deno-version: ${{ matrix.deno-version }} + + - name: Check mod.ts + run: time deno cache mod.ts + + - name: Check examples + run: time deno cache examples/**/*.ts + + - name: Run dialer examples + run: | + time ./examples/dialer/https_cloudflare-dns.ts + time ./examples/dialer/https_google-dns.ts + + - name: Run fetch examples + run: | + time ./examples/fetch/http_dagd.ts + time ./examples/fetch/https_dagd.ts diff --git a/README.md b/README.md index f4e080a..28575a2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![Deno CI](https://github.com/cloudydeno/deno-socket_fetch/workflows/CI/badge.svg?branch=main) + # `/x/socket_fetch` ## What?