forked from RedHatInsights/patchman-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1.19 KB
/
ci-checks.yml
File metadata and controls
33 lines (33 loc) · 1.19 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
name: 'CI: Lint & Unit Tests'
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
jobs:
ci-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 24.x
cache: 'npm'
- run: npm ci
- run: npm run lint
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --last --verbose
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'red-hat-konflux[bot]' && github.event.pull_request.user.login != 'dependabot[bot]'
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- run: npm run ci:verify
- name: Upload code coverage
uses: codecov/codecov-action@v6.0.1
with:
fail_ci_if_error: true
files: ./coverage/coverage-final.json,./coverage-jest/coverage-final.json
token: ${{ secrets.CODECOV_TOKEN }}
- run: npm run build