Code Monkey home page Code Monkey logo

setup-deno's Issues

Cache deno modules

It would be nice if this action had a way to cache deno modules that had been downloaded in previous runs, similarly to https://github.com/actions/setup-node#caching-global-packages-data

The cache looks like it is easy enough to find https://deno.land/manual/linking_to_external_code#linking-to-third-party-code . However, I'm unsure what the key/hash for lookup and download would be to:

  • Determine if a module had changed in any file.
  • Lookup existing module caches.

This part is easier with a NodeJS package manager such as npm or yarn as you can just use a hash of the lockfile.

FYI: matrix builds

Hi,

it might be convenient to document in the Readme how to test multiple versions using matrix builds, e.g.:

# This workflow will test on Deno lastest stable major and canary
# see https://github.com/marketplace/actions/setup-deno for details
name: Deno CI
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        deno-version: [vx.x.x, canary]
    steps:
    - uses: actions/checkout@v2
    - name: Use Deno ${{ matrix.deno-version }}
      uses: denoland/setup-deno@v1
    - run: deno test

I have this working at https://github.com/seriousme/durable-data/blob/master/.github/workflows/deno-ci.yml

Kind regards,
Hans

Deprecation warnings for set-output commands

Seeing the following warning when using this action:

Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Improve README info about targeting latets deno

Whilst the readme says "targets the latest stable", this isn't strictly true because that example would still target v1.x.x, even if v2.1.2 is the latest

I'd suggest clarifying that a user can still use vx.x.x syntax to target the latest, which was something I had to ask on the discord

Default to `v1.x`?

Instead of writing:

- uses: denoland/setup-deno@v1
  with:
    deno-version: v1.x

It would be nice to write:

- uses: denoland/setup-deno@v1

Then when deno v2 is released we can bump the version of this action:

- uses: denoland/setup-deno@v2

The one risk for this is if we would want to make any breaking changes to the action, but I feel we could just do that when a new major deno version release occurs.

This would not be a breaking change because not providing a deno-version currently errors.

Support .dvmrc

I personally use a .dvmrc file to keep track of the deno version used for that specific repo/project, so it would be helpful to have the possibility to have the action read that instead of having to update in two places.

This is supported by actions/setup-node, like:

  - name: Setup node
    uses: actions/setup-node@v2
    with:
      node-version-file: '.nvmrc'

So it could be supported with something like:

  - name: Setup Deno
    uses: denoland/setup-deno@v1
    with:
      deno-version-file: '.dvmrc'

404 from download url https://github.com/denoland/deno/releases/download...

Setup a `v1` tag that points to the latest version of the action

We noticed recently in one of our projects that our GHA wasn't pulling through the correct version of denoland/setup-deno I believe this is because there isn't major and minor version tags setup that points to the same ref as the most recent version. e.g v1 / v1.1

For example: https://github.com/actions/checkout/tags

As mentioned in 3. here: https://docs.github.com/en/actions/creating-actions/releasing-and-maintaining-actions#example-developer-process

Cannot fetch versions.json

A few issues here:

  1. I am getting Error: Failed to fetch stable version info from raw.githubusercontent.com. Please try again later.. I am using denoland/setup-deno@v1.
  2. Digging through the v1 branch, the error message is incorrect because the file being fetched is from https://deno.com/versions.json
  3. At the moment, curl -I "https://deno.com/versions.json" takes a long time to complete so I suspect the fetch is timing out.
⟩ time curl --no-progress-meter -I "https://deno.com/versions.json"
HTTP/2 200
content-type: application/json
cross-origin-embedder-policy: same-origin
cross-origin-opener-policy: same-origin
cross-origin-resource-policy: same-origin
referrer-policy: strict-origin-when-cross-origin
strict-transport-security: max-age=63072000; includeSubDomains; preload
x-content-type-options: nosniff
x-frame-options: DENY
date: Tue, 22 Aug 2023 08:06:08 GMT
via: http/2 edgeproxy-h
server: deno/gcp-asia-northeast1


________________________________________________________
Executed in   10.22 secs      fish           external
   usr time   14.08 millis    8.86 millis    5.22 millis
   sys time   12.91 millis    4.65 millis    8.26 millis

setup-deno can't work on Actions with Ubuntu

Hello!

I tried with nektos/act locally, but setup-deno failed.
Actions Setting:

name: CI
on: [push, pull_request]


jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
    name: Deno CI
    steps:
      - uses: actions/checkout@master
      - name: Setup Deno
        uses: denolib/[email protected]
        with:
          deno-version: "1.28.0"
      - run: deno run https://deno.land/std/examples/welcome.ts

I saw this log, see this image.
image

How do dissolution this error? Thank you.

Error: Unable to resolve action `denoland/[email protected]`, unable to find version `1.1.4`

Hello !

I'm tryna use this github action for my project, but I get this error :

Error: Unable to resolve action denoland/[email protected], unable to find version 1.1.4

This is strange because i'm really using the simplest workflow file you could imagine and I can't figure out why this bug is happening

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@v3

      - name: Setup Deno
        uses: denoland/[email protected]
        with:
          deno-version: v1.x

      - name: Run linter
        run: deno lint

You can find the full source code here :

https://github.com/ebanDev/ent-cookies/

Thank you ! :)
Eban

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.