generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (87 loc) · 2.87 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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: "Setup: PNPM"
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
with:
version: 8.9.0
- 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 && 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: turbo test --token ${{ secrets.BUILDLESS_APIKEY }} --no-daemon --remote-only
- 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=buildless
-Dsonar.projectKey=buildless_setup-buildless
-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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- 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