Add Deno workflow for linting and testing#3249
Open
asperpharma wants to merge 2 commits into
Open
Conversation
This workflow installs Deno and runs linting and tests on push and pull request events to the main branch.
Open
There was a problem hiding this comment.
Pull request overview
This PR adds a Deno CI workflow file at .github/workflows/deno.yml that runs deno lint and deno test on push and pull request to main. However, this repository is the GitHub starter-workflows repo (templates exposed in the Actions tab), not a project where a .github/workflows/ CI workflow should be added. An equivalent Deno starter workflow already exists at ci/deno.yml with a matching ci/properties/deno.properties.json, so this addition appears to be a misuse of the repository as called out in the README.
Changes:
- Adds
.github/workflows/deno.yml(duplicates the existingci/deno.yml, but with hardcoded"main"instead of the$default-branchplaceholder used in starter workflows).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+42
| # This workflow uses actions that are not certified by GitHub. | ||
| # They are provided by a third-party and are governed by | ||
| # separate terms of service, privacy policy, and support | ||
| # documentation. | ||
|
|
||
| # This workflow will install Deno then run `deno lint` and `deno test`. | ||
| # For more information see: https://github.com/denoland/setup-deno | ||
|
|
||
| name: Deno | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| pull_request: | ||
| branches: ["main"] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Setup repo | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Deno | ||
| # uses: denoland/setup-deno@v1 | ||
| uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2 | ||
| with: | ||
| deno-version: v1.x | ||
|
|
||
| # Uncomment this step to verify the use of 'deno fmt' on each commit. | ||
| # - name: Verify formatting | ||
| # run: deno fmt --check | ||
|
|
||
| - name: Run linter | ||
| run: deno lint | ||
|
|
||
| - name: Run tests | ||
| run: deno test -A |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This workflow installs Deno and runs linting and tests on push and pull request events to the main branch.
Pre-requisites
Please note that at this time we are only accepting new starter workflows for Code Scanning. Updates to existing starter workflows are fine.
Tasks
For all workflows, the workflow:
.ymlfile with the language or platform as its filename, in lower, kebab-cased format (for example,docker-image.yml). Special characters should be removed or replaced with words as appropriate (for example, "dotnet" instead of ".NET").GITHUB_TOKENso that the workflow runs successfully.For CI workflows, the workflow:
cidirectory.ci/properties/*.properties.jsonfile (for example,ci/properties/docker-publish.properties.json).pushtobranches: [ $default-branch ]andpull_requesttobranches: [ $default-branch ].releasewithtypes: [ created ].docker-publish.yml).For Code Scanning workflows, the workflow:
code-scanningdirectory.code-scanning/properties/*.properties.jsonfile (for example,code-scanning/properties/codeql.properties.json), with properties set as follows:name: Name of the Code Scanning integration.creator: Name of the organization/user producing the Code Scanning integration.description: Short description of the Code Scanning integration.categories: Array of languages supported by the Code Scanning integration.iconName: Name of the SVG logo representing the Code Scanning integration. This SVG logo must be present in theiconsdirectory.pushtobranches: [ $default-branch, $protected-branches ]andpull_requesttobranches: [ $default-branch ]. We also recommend ascheduletrigger ofcron: $cron-weekly(for example,codeql.yml).Some general notes:
actionsorganization, or