Skip to content

Commit 177351d

Browse files
authored
Merge pull request #4 from Runninghill/feature/pipeline
Setup CI/CD pipeline with Azure DevOps.
2 parents 67badb0 + b603a4b commit 177351d

File tree

8 files changed

+9886
-2483
lines changed

8 files changed

+9886
-2483
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/bazel-out
99

1010
# dependencies
11-
/node_modules
11+
node_modules/
1212

1313
# profiling files
1414
chrome-profiler-events*.json

CONTRIBUTOR_README.md renamed to README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
![Runninghill Logo](./docs/runninghill.png "Runninghill")
1+
![Runninghill Logo](https://github.com/Runninghill/rh-angular-rsa-form-validators/blob/67badb0d7a78dca5c7ccacb729bbb3e5b0c5f8db/docs/runninghill.png?raw=true "Runninghill")
22

33
# Angular South African Form Validators
44

5+
> Please note that this is the README for contributors, if you
6+
> need instructions on how to consume this package, please take a
7+
> look [here](https://github.com/Runninghill/rh-angular-rsa-form-validators/blob/main/projects/rh-rsa-form-validators/README.md).
8+
59
A set of South African specific validators for Angular forms.
610

711
# Getting Started🏁

azure-pipelines.yml

Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,66 @@ trigger:
99
pool:
1010
vmImage: ubuntu-latest
1111

12-
steps:
13-
- script: echo Hello, world!
14-
displayName: 'Run a one-line script'
15-
16-
- script: |
17-
echo Add other tasks to build, test, and deploy your project.
18-
echo See https://aka.ms/yaml
19-
displayName: 'Run a multi-line script'
12+
stages:
13+
- stage: PRTest
14+
displayName: PR Test Stage
15+
jobs:
16+
- job: PR_Test
17+
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
18+
steps:
19+
- task: NodeTool@0
20+
inputs:
21+
versionSpec: '14.16.x'
22+
displayName: 'Install Node.js'
23+
24+
- script: npm install -g @angular/cli
25+
displayName: 'Install Angular CLI'
26+
27+
- task: Npm@1
28+
inputs:
29+
workingDir: $(System.DefaultWorkingDirectory)/projects/rh-rsa-form-validators
30+
command: 'install'
31+
displayName: 'Install package dependencies'
32+
33+
- task: Npm@1
34+
inputs:
35+
workingDir: $(System.DefaultWorkingDirectory)/projects/rh-rsa-form-validators
36+
command: 'custom'
37+
customCommand: 'run lint'
38+
displayName: 'Run eslint checks'
39+
40+
- task: Npm@1
41+
inputs:
42+
workingDir: $(System.DefaultWorkingDirectory)/projects/rh-rsa-form-validators
43+
command: 'custom'
44+
customCommand: 'run test'
45+
displayName: 'Run unit tests'
46+
47+
48+
- stage: Publish
49+
displayName: Publish to NPM
50+
dependsOn: PRTest
51+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
52+
jobs:
53+
- job: Publish_to_npm
54+
steps:
55+
- task: Npm@1
56+
inputs:
57+
workingDir: $(System.DefaultWorkingDirectory)
58+
command: 'install'
59+
displayName: 'Install workspace dependencies'
60+
61+
- task: Npm@1
62+
inputs:
63+
workingDir: $(System.DefaultWorkingDirectory)/projects/rh-rsa-form-validators
64+
command: 'custom'
65+
customCommand: 'run build'
66+
displayName: 'Build package'
67+
68+
- task: Npm@1
69+
inputs:
70+
workingDir: $(System.DefaultWorkingDirectory)/dist/rh-rsa-form-validators
71+
command: 'custom'
72+
customCommand: 'publish --access public'
73+
customEndpoint: 'npm_runninghill'
74+
displayName: 'Publish to npmjs.org'

0 commit comments

Comments
 (0)