Created
March 7, 2024 13:12
-
-
Save niklasmtj/bd0f8e2da5e548bb028804913003e98f to your computer and use it in GitHub Desktop.
Github Action that can be used for running CI tasks in Deno. Run tests, check code for formatting errors and lint the code base. Fails on found irregularities in tests, format (fmt) and linting
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
name: "CI" | |
on: | |
- pull_request | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Setup Deno" | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: "1.x" | |
- name: "Run Tests" | |
run: deno task test | |
- name: "Run Lint" | |
run: deno task lint | |
- name: "Run Format" | |
run: deno task format |
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
{ | |
"tasks": { | |
"dev": "deno run --watch main.ts", | |
"lint": "deno lint", | |
"format": "deno fmt --check", | |
"test": "deno test --allow-read --allow-write --allow-net" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment