forked from Nick2bad4u/UserStyles
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (55 loc) · 2.07 KB
/
deno.yml
File metadata and controls
66 lines (55 loc) · 2.07 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
# 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
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: Setup repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Deno
# uses: denoland/setup-deno@v1
uses: denoland/setup-deno@909cc5acb0fdd60627fb858598759246509fa755 # v2.0.2
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