-
Notifications
You must be signed in to change notification settings - Fork 5
70 lines (58 loc) · 2.14 KB
/
deno.yml
File metadata and controls
70 lines (58 loc) · 2.14 KB
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
# This GitHub Actions workflow is designed to automate the process of setting up Deno,
# running lint checks, and executing tests on a repository. It triggers on push and
# pull request events to the 'main' branch. The workflow includes the following steps:
#
# 1. Harden Runner: Uses the 'step-security/harden-runner' action to enhance the security
# of the GitHub Actions runner by auditing egress traffic.
#
# 2. Setup repo: Uses the 'actions/checkout' action to check out the repository's code.
#
# 3. Setup Deno: Uses the 'denoland/setup-deno' action to install Deno with the specified
# version (v1.x).
#
# 4. Run linter: Executes 'deno lint' to perform linting on the codebase.
#
# 5. Run tests: Executes 'deno test -A' to run tests with all permissions.
#
# Additionally, there is an optional step to verify code formatting using 'deno fmt --check',
# which is currently commented out.
#
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno
name: Deno
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
concurrency:
group: deno-${{ github.ref }}
cancel-in-progress: false
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: Setup repo
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Setup Deno
# uses: denoland/setup-deno@v1
uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
with:
deno-version: v1.x
# Uncomment this step to verify the use of 'deno fmt' on each commit.
# - name: Verify formatting
# run: deno fmt --check
- name: Run linter
run: deno lint
- name: Run tests
run: deno test -A