Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache deps for DENO #3

Open
vikiival opened this issue Apr 25, 2023 · 0 comments
Open

Cache deps for DENO #3

vikiival opened this issue Apr 25, 2023 · 0 comments

Comments

@vikiival
Copy link
Member

https://dev.to/craigmorten/github-actions-with-deno-5fnd#comment-25424

name: tests

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  DENO_VERSION: "1.30.3"
  DENO_DIR: ~/.deno-cache

jobs:
  test:
    runs-on: ubuntu-22.04
    steps:
      - name: Git Checkout Deno Module
        uses: actions/checkout@v3
      - name: Use Deno Version ${{ env.DENO_VERSION }}
        uses: denoland/setup-deno@v1
        with:
          deno-version: ${{ env.DENO_VERSION }}
      - name: Lint Deno Module
        run: deno fmt --check
      # Follows https://deno.land/[email protected]/advanced/continuous_integration#caching-dependencies
      # but use the latest cache@v3
      - name: Cache Deno dependencies 
        uses: actions/cache@v3
        with:
          path: ${{ env.DENO_DIR }}
          key: ${{ hashFiles('deno.lock') }}
      - name: Run Deno Tests
        run: deno test --allow-read --allow-env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant