You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-2Lines changed: 33 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,10 +19,41 @@ Create a workflow `.yml` file in your repositories `.github/workflows` directory
19
19
### Example workflow - match Angular versions
20
20
21
21
```yaml
22
-
todo: 'Complete example later'
22
+
name: Node.js CI
23
+
24
+
on:
25
+
push:
26
+
branches: [master]
27
+
pull_request:
28
+
branches: [master]
29
+
30
+
jobs:
31
+
build:
32
+
runs-on: ubuntu-latest
33
+
34
+
strategy:
35
+
matrix:
36
+
node-version: [10.x, 12.x, 14.x]
37
+
angular-version: [8.0.0, 9.0.0, 10.0.0]
38
+
39
+
steps:
40
+
- uses: actions/checkout@v2
41
+
- name: Use Node.js ${{ matrix.node-version }}
42
+
uses: actions/setup-node@v1
43
+
with:
44
+
node-version: ${{ matrix.node-version }}
45
+
- name: Change to the right Angular version
46
+
uses: ngworker/angular-versions-action@v1
47
+
with:
48
+
angular-version: ${{ matrix.angular-version }}
49
+
50
+
- run: yarn
51
+
- run: yarn lint
52
+
- run: yarn build
53
+
- run: yarn test
23
54
```
24
55
25
-
This will replace the version of several dependencies related to Angular in the package.json. It will use versions compatible with the given Angular version.
56
+
This example use the github matrix to build, lint and test your code against different versions of `Angular`. This should be specially useful for library authors.
0 commit comments