-
Notifications
You must be signed in to change notification settings - Fork 135
63 lines (61 loc) · 1.74 KB
/
pr.yaml
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
name: pr
on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
skip_coveralls:
description: "Skip coveralls"
type: boolean
default: false
skip_sonarcloud:
description: "Skip sonarcloud"
type: boolean
default: false
skip_tests:
description: "Skip tests"
type: boolean
default: false
jobs:
pr-build:
runs-on: ubuntu-latest
concurrency: ci-${{ github.ref }}
environment:
name: pr
steps:
- id: checkout
name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- id: nodejs
name: Use Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 22.x
cache: "npm"
- id: build
name: Build
run: npm run ci:build
- id: test
if: ${{ !github.event.inputs.skip_tests }}
name: Test
run: npm run ci:test
- id: docs
name: Build docs
run: npm run ci:docs
- id: coveralls
if: ${{ !github.event.inputs.skip_coveralls }}
name: Coveralls
uses: coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8 # v2
- id: sonarcloud
if: ${{ env.SONAR_TOKEN && !github.event.inputs.skip_sonarcloud }}
name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@e44258b109568baa0df60ed515909fc6c72cba92 # v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}