-
Notifications
You must be signed in to change notification settings - Fork 9
36 lines (34 loc) · 1.05 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
#yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Node.js CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
Validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- name: Lint TypeScript
run: npm run lint
- name: Lint Dockerfile
uses: hadolint/[email protected]
id: hadolint
with:
dockerfile: Dockerfile
- run: echo -e "### Hadolint - ${{ steps.hadolint.outcome }}\n${{ env.HADOLINT_RESULTS }}" >> $GITHUB_STEP_SUMMARY
- run: npm test -- --coverage --testLocationInResults --json --outputFile coverage/report.json
- uses: ArtiomTr/jest-coverage-report-action@v2
if: ${{ github.actor != 'dependabot[bot]' }}
with:
skip-step: all
coverage-file: coverage/report.json
base-coverage-file: coverage/report.json