generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (87 loc) · 2.83 KB
/
ci.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: CI
on:
pull_request: {}
merge_group: {}
push:
branches:
- main
- 'releases/*'
jobs:
test-typescript:
name: "Test: Unit Tests"
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- name: "Setup: Checkout"
id: checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: "Setup: PNPM"
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9.1.4
- name: "Setup: Node"
id: setup-node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 20
cache: pnpm
- name: "Setup: Install Dependencies"
id: install
run: pnpm install --frozen-lockfile && pnpm install -g turbo
- name: Check Format
id: npm-format-check
run: pnpm run format:check
- name: Lint
id: npm-lint
run: pnpm run lint
- name: Test
id: npm-ci-test
run: pnpm run test
- name: "Test: Sonar"
uses: SonarSource/sonarcloud-github-action@5ee47de3c96f0c1c51b09d2ff1fec0cfeefcf67c # master
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=elide-dev
-Dsonar.projectKey=elide-dev_setup-elide
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.sources=src/
-Dsonar.tests=__tests__/
-Dsonar.verbose=true
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.testExecutionReportPaths=test-report.xml
- name: "Report: Coverage"
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test-action:
name: "Test: Actions"
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- name: "Setup: Checkout"
id: checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: "Test: Local Action"
id: test-action
uses: ./
with: {}
- name: "Test: Print Output"
id: output
run: echo "${{ steps.test-action.outputs.path }}"
check-dist:
name: "Test: Dist"
uses: ./.github/workflows/check-dist.yml
secrets: inherit
permissions:
contents: read
statuses: write