-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (58 loc) · 1.87 KB
/
deno.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# This workflow will install Deno then run Deno lint and test.
# For more information see: https://github.com/denoland/setup-deno
name: Deno Deploy & Test
on:
push:
branches: ["main","test"]
pull_request:
branches: ["main","test"]
permissions:
id-token: write # This is required to allow the GitHub Action to authenticate with Deno Deploy.
contents: read
jobs:
test:
runs-on: ubuntu-latest
env:
# DENO_ENV: testing
# BASE_URL: http://localhost:8000
DENO_DIR: deno_dir
CHROMIUM_PATH: deno_dir/deno_puppeteer/chromium/
steps:
- name: Setup repo
uses: actions/checkout@v3
- name: Setup .env secrets file
run: echo $ENV_GITHUB_ACTIONS | base64 -d > .env
env:
ENV_GITHUB_ACTIONS: ${{ secrets.ENV_GITHUB_ACTIONS }}
- name: Setup Deno
# uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Verify formatting
run: deno fmt --check
# - name: Run linter
# run: deno lint
- name: Cache Deno dependencies
uses: actions/cache@v3
with:
# The Chrome install gets cached in here too...
key: denoDeps-${{ hashFiles('deno.lock') }}
path: ${{ env.DENO_DIR }}
- name: Install Chromium for Puppeteer
run: PUPPETEER_PRODUCT=chrome deno run -A https://deno.land/x/[email protected]/install.ts
- name: Cache puppeteer
uses: actions/cache@v3
with:
key: puppeteer_${{ runner.os }}_v16_2_0
path: ${{ env.CHROMIUM_PATH }}
- name: Run tests
run: deno test -A --unstable
- name: Build step
run: deno task build
- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "hyprtxt"
entrypoint: "main.ts"
root: "."