Browse Source
chore: optimize deno workflow for CI/CD (#605)
* chore: optimize deno workflow for CI/CD
* add install step
pull/606/head
Dan Ditomaso
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
43 additions and
4 deletions
-
.github/workflows/ci.yml
-
.github/workflows/pr.yml
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
name: CI |
|
|
|
name: Push to Master/Main CI |
|
|
|
|
|
|
|
on: |
|
|
|
push: |
|
|
|
@ -25,6 +25,25 @@ jobs: |
|
|
|
- name: Install Dependencies |
|
|
|
run: deno install |
|
|
|
|
|
|
|
- name: Cache Deno dependencies |
|
|
|
uses: actions/cache@v4 |
|
|
|
with: |
|
|
|
path: | |
|
|
|
~/.cache/deno |
|
|
|
./deno.lock |
|
|
|
key: ${{ runner.os }}-deno-${{ hashFiles('**/deno.lock') }} |
|
|
|
restore-keys: | |
|
|
|
${{ runner.os }}-deno- |
|
|
|
|
|
|
|
- name: Cache Dependencies |
|
|
|
run: deno cache src/index.tsx |
|
|
|
|
|
|
|
- name: Run linter |
|
|
|
run: deno task lint |
|
|
|
|
|
|
|
- name: Check formatter |
|
|
|
run: deno task format --check |
|
|
|
|
|
|
|
- name: Run tests |
|
|
|
run: deno task test |
|
|
|
|
|
|
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
name: Pull Request |
|
|
|
name: Pull Request CI |
|
|
|
|
|
|
|
on: pull_request |
|
|
|
on: |
|
|
|
pull_request: |
|
|
|
|
|
|
|
jobs: |
|
|
|
build: |
|
|
|
@ -14,9 +15,28 @@ jobs: |
|
|
|
with: |
|
|
|
deno-version: v2.x |
|
|
|
|
|
|
|
- name: Cache Deno dependencies |
|
|
|
uses: actions/cache@v4 |
|
|
|
with: |
|
|
|
path: | |
|
|
|
~/.cache/deno |
|
|
|
./deno.lock |
|
|
|
key: ${{ runner.os }}-deno-${{ hashFiles('**/deno.lock') }} |
|
|
|
restore-keys: | |
|
|
|
${{ runner.os }}-deno- |
|
|
|
|
|
|
|
- name: Install Dependencies |
|
|
|
run: deno install |
|
|
|
|
|
|
|
|
|
|
|
- name: Cache Dependencies |
|
|
|
run: deno cache src/index.tsx |
|
|
|
|
|
|
|
- name: Run linter |
|
|
|
run: deno task lint |
|
|
|
|
|
|
|
- name: Check formatter |
|
|
|
run: deno task format --check |
|
|
|
|
|
|
|
- name: Run tests |
|
|
|
run: deno task test |
|
|
|
|
|
|
|
|