chore: bump minimum required Deno version to 1.46.0 and cleanup #578
Workflow file for this run
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: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: test-${{ matrix.os }}-${{ matrix.deno }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# Test on the oldest supported, the latest stable, and nightly | |
deno: [old, stable, canary] | |
os: [macOS-latest, windows-latest, ubuntu-latest] | |
env: | |
DENO_FUTURE: ${{ matrix.deno == 'old' && '1' || '0' }} | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v3 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
# 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 | |
- name: Format | |
if: runner.os == 'Linux' && matrix.deno == 'stable' | |
run: deno fmt --check | |
- name: Lint | |
if: runner.os == 'Linux' && matrix.deno == 'stable' | |
run: deno lint | |
- name: Typecheck | |
if: runner.os == 'Linux' && matrix.deno == 'stable' | |
run: deno check deployctl.ts | |
- 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 | |
run: deno task test |