-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (40 loc) · 1.32 KB
/
node.js.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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16.x
- name: NPM Install
run: npm install
- name: Unit Tests
run: npm run test
- name: Lint Validation
run: npm run lint
- name: Prune Packages
run: npm prune --production
- name: Docker Build for Integration Test
run: docker build . -t salesforce/cix:local
- name: Reinstall dev modules for itest
run: npm install
- name: Integration Tests
run: npm run itest
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: salesforce/cix/cix
cache_froms: salesforce/cix:local
tag_with_ref: true
add_git_labels: true