forked from microsoft/durabletask-js
-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (66 loc) · 1.85 KB
/
pr-validation.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: 🚀 Test and Build
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
env:
NODE_VER: 16.14.0
jobs:
build:
runs-on: ubuntu-latest
services:
durabletask-sidecar:
image: cgillum/durabletask-sidecar:latest
ports:
- 4001:4001
env:
DURABLETASK_SIDECAR_LOGLEVEL: Debug
DURABLETASK_STORAGE_PROVIDER: Emulator
steps:
- name: 📥 Checkout code
uses: actions/checkout@v2
- name: Initialize and update submodules
run: |
git submodule update --init --recursive
- name: ⚙️ NodeJS - Install
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VER }}
registry-url: "https://registry.npmjs.org"
- name: ⚙️ Install dependencies
run: npm install
- name: ✅ Run unit tests
run: npm test test/unit
- name: ✅ Run e2e tests
run: ./scripts/test-e2e.sh
publish:
if: startswith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
# TODO environment?
# environment: production
steps:
- name: 📥 Checkout code
uses: actions/checkout@v2
- name: Initialize and update submodules
run: |
git submodule update --init --recursive
- name: ⚙️ NodeJS - Install
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VER }}
registry-url: "https://registry.npmjs.org"
- name: ⚙️ Install dependencies
run: npm install
- name: ✅ Run unit tests
run: npm test test/unit
- name: Build package
run: npm run build-ci
- name: Publish to npm (@dapr/durabletask-js)
run: npm publish build/ --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}