Skip to content

Commit

Permalink
chore: bump minimum required Deno version to 1.46.0 and cleanup (#332)
Browse files Browse the repository at this point in the history
This commit bumps the minimum required Deno version to 1.46.0 and cleanups the
code mainly to deal with deprecated Deno APIs.

Fixes #328
  • Loading branch information
magurotuna authored Oct 21, 2024
1 parent 8644ec5 commit bd19482
Show file tree
Hide file tree
Showing 58 changed files with 600 additions and 3,800 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ jobs:
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno == 'old' && '1.41.1' || (matrix.deno == 'stable' && '1.x' || matrix.deno) }}
# Make sure to keep this in sync with the one defined in version.ts.
# Also don't forget to update README.md.
deno-version: ${{ matrix.deno == 'old' && '1.46.0' || (matrix.deno == 'stable' && '2.x' || matrix.deno) }}

- run: deno --version

Expand All @@ -40,10 +42,16 @@ jobs:
if: runner.os == 'Linux' && matrix.deno == 'stable'
run: deno check deployctl.ts

- name: Run tests
run: deno task test

- name: action/deps.js up-to-date
if: runner.os == 'Linux' && matrix.deno == 'stable'
run: |
# @deno/emit doesn't work if JSR modules are not in the cache.
# This is a workaround to cache the JSR modules beforehand.
deno cache ./src/utils/mod.ts
deno run --allow-read --allow-env --allow-net ./tools/bundle.ts ./src/utils/mod.ts > ./action/latest.deps.js
diff ./action/latest.deps.js ./action/deps.js
- name: Run tests
# Deno 1.x does not support lockfile v4. To work around this, we append
# `--no-lock` in this case.
run: deno test -A ${{ matrix.deno == 'old' && '--no-lock' || '' }} tests/ src/
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ jobs:
root: action/tests
entrypoint: include_exclude.ts
include: include_exclude.ts
- name: Deploy with comma-separated include
- name: Deploy with comma-separated include
uses: ./
with:
project: happy-rat-64
root: action
entrypoint: tests/include_exclude.ts
include: foo,tests/include_exclude.ts,bar
- name: Deploy with comma-separated exclude
- name: Deploy with comma-separated exclude
uses: ./
with:
project: happy-rat-64
root: action/tests
entrypoint: include_exclude.ts
exclude: import_bomb1,import_bomb2
- name: Deploy with multiline exclude
- name: Deploy with multiline exclude
uses: ./
with:
project: happy-rat-64
Expand Down Expand Up @@ -74,4 +74,4 @@ jobs:
with:
project: happy-rat-64
root: action/tests
entrypoint: always_exclude_node_modules/main.ts
entrypoint: always_exclude_node_modules/main.ts
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ contains the `denoland/deployctl` GitHub Action.

## Prerequisite

You need to have Deno 1.41.1+ installed (latest version is recommended; just run
You need to have Deno 1.46.0+ installed (latest version is recommended; just run
`deno upgrade`)

## Install
Expand Down
2 changes: 1 addition & 1 deletion action/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
id-token: write # required
contents: read
steps:
# your steps here...
# your steps here...
```

### Inputs
Expand Down
Loading

0 comments on commit bd19482

Please sign in to comment.