Skip to content

Commit

Permalink
chore: add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Mar 23, 2021
1 parent fc37084 commit 48cc663
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: ci

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
name: test-${{ matrix.os }}-${{ matrix.deno }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
# Test on the oldest supported, the latest stable, and nightly
deno: [old, stable, canary]
os: [macOS-latest, windows-latest, ubuntu-latest-xl]

steps:
- name: Setup repo
uses: actions/checkout@v2

- name: Setup Deno
run: |
curl -fsSL https://deno.land/x/install/install.sh | sh ${{ matrix.deno == 'old' && '-s v1.8.0' || '' }}
echo "$HOME/.deno/bin" >> $${{ runner.os == 'Windows' && 'env:' || '' }}GITHUB_PATH
- name: Upgrade to Deno canary
if: matrix.deno == 'canary'
run: deno upgrade --canary

- run: deno --version

- name: Format
if: runner.os == 'Linux'
run: deno fmt --check

- name: Lint
if: runner.os == 'Linux'
run: deno lint --unstable

- name: Typecheck
run: deno cache deployctl.ts

# - name: Run tests
# run: deno test -A
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ deno install --allow-read --allow-write --allow-env --allow-net --allow-run --no

```
deployctl run ./examples/hello.js
```
```
8 changes: 7 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
bundle:
echo "// Copyright 2021 Deno Land Inc. All rights reserved. MIT license.\n// deno-lint-ignore-file\n// deno-fmt-ignore-file" > src/runtime.bundle.js
deno bundle src/runtime.js >> src/runtime.bundle.js
deno bundle src/runtime.js >> src/runtime.bundle.js

fmt:
deno fmt

lint:
deno lint

0 comments on commit 48cc663

Please sign in to comment.