forked from angular-schule/ngx-deploy-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 15
66 lines (54 loc) · 1.67 KB
/
basic-test.yml
File metadata and controls
66 lines (54 loc) · 1.67 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
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
name: Essential Test
on: workflow_call
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Lint
run: npx nx lint ngx-deploy-npm
- name: Lint report
run: npx nx lint-report ngx-deploy-npm
- name: Archive lint report results
uses: actions/upload-artifact@v5
with:
name: lint-report
path: reports
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: npx nx build ngx-deploy-npm
- name: Archive build result
uses: actions/upload-artifact@v5
with:
name: library-dist
path: dist
unit-test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20, 22]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}
- run: npx nx test ngx-deploy-npm --configuration="ci"
- name: Set Node.js version based on .nvmrc
id: nvmrc
shell: bash
run: |
version=$(cat .nvmrc)
echo "Setting default value for node-version parameter: $version"
echo "node_version=$version" >> $GITHUB_OUTPUT
echo "$version"
- if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == steps.nvmrc.outputs.node_version }}
name: Archive coverage report
uses: actions/upload-artifact@v5
with:
name: ngx-deploy-npm-coverage-report
path: coverage/packages/ngx-deploy-npm/lcov.info