-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
90 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: ci | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: ubuntu-latest | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: Setup Environment | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Deno | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: 1.x.x | ||
|
||
- name: Log versions | ||
run: | | ||
deno --version | ||
# Lint & Format | ||
- name: Lint & Format TS | ||
run: | | ||
deno lint | ||
deno fmt --check | ||
# Tests | ||
- name: Test TS | ||
run: deno test |
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,53 @@ | ||
name: udd-update-dependencies | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "42 9 * * *" | ||
|
||
jobs: | ||
update-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: 1.x.x | ||
- name: Update dependencies | ||
run: | | ||
deno run -A https://deno.land/x/udd/main.ts deps.ts test_deps.ts | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
id: pr | ||
with: | ||
commit-message: "Update dependencies" | ||
title: Update dependencies | ||
body: > | ||
Dependencies updated by [udd](https://github.com/hayd/deno-udd). | ||
branch: deno-dependency-updates | ||
author: GitHub <[email protected]> | ||
delete-branch: true | ||
- name: Retrieve commit sha | ||
id: commit | ||
run: | | ||
echo "::set-output name=sha::$(git rev-parse HEAD)" | ||
- name: Set commit status with pending | ||
uses: Sibz/github-status-action@v1 | ||
with: | ||
authToken: ${{ secrets.GITHUB_TOKEN }} | ||
context: "Basic tests" | ||
state: "pending" | ||
sha: ${{ steps.commit.outputs.sha }} | ||
- name: Basic tests | ||
id: test | ||
continue-on-error: true | ||
run: | | ||
deno test --allow-read --allow-write | ||
- name: Set commit status with outcome | ||
uses: Sibz/github-status-action@v1 | ||
with: | ||
authToken: ${{ secrets.GITHUB_TOKEN }} | ||
context: "Basic tests" | ||
description: "To run other CI actions close/reopen this PR" | ||
state: ${{ steps.test.outcome }} | ||
sha: ${{ steps.commit.outputs.sha }} |
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,7 +1,6 @@ | ||
// deno-lint-ignore-file require-await | ||
import { MongoClient, ObjectId } from "./mod.ts"; | ||
import { deferred } from "https://deno.land/[email protected]/async/deferred.ts"; | ||
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts"; | ||
import { assertEquals, deferred } from "./test_deps.ts"; | ||
|
||
Deno.test("Sample Test", async () => { | ||
const fetchMock = deferred<{ url: string; init: RequestInit }>(); | ||
|
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,2 @@ | ||
export { deferred } from "https://deno.land/[email protected]/async/deferred.ts"; | ||
export { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts"; |