forked from Azure/appservice-settings
-
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.27 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
build_test_job:
name: 'Build and test job'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: 'Checking out repo code'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Setup Node.js'
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20'
- name: 'Validate build'
run: |
npm ci
npm run build
- name: 'Run L0 tests'
run: |
npm run test
# validate if the dist folder has no changes that are not commited
- name: Check for uncommitted changes
# do not run on Windows runnrs because it always has issues, perhaps line endings or something?
if: runner.os != 'Windows'
shell: pwsh
run: |
if ((git status --porcelain dist).Length -ne 0) {
Write-Output "dist folder has changes that are not committed:"
git status --porcelain dist
exit 1
}
else {
Write-Output "dist folder has no changes"
}