-
Notifications
You must be signed in to change notification settings - Fork 23
107 lines (83 loc) · 2.65 KB
/
ci.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
pull_request:
push:
branches:
- master
tags:
- 'v*.*.*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# ci-ubuntu:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup NodeJS
# uses: actions/setup-node@v4
# with:
# node-version: '18'
# registry-url: https://registry.npmjs.org
# - name: Update NPM
# run: npm install -g npm@latest
# - name: Installing Dependencies
# run: npm i
# - name: Lint
# run: npm run lint
# - name: Build
# run: npm run build
# # TODO: Have working unit tests generated
# # - name: Run Unit Tests
# # run: |
# # npm run test
# - name: Setup MetaCall CLI
# run: wget -O - https://raw.githubusercontent.com/metacall/install/master/install.sh | sh
# - name: Run Integration Tests
# shell: bash
# run: ./test.sh
# - name: Publish
# uses: JS-DevTools/npm-publish@v3
# if: startsWith(github.ref, 'refs/tags/')
# with:
# access: 'public'
# token: ${{ secrets.NPM_AUTH_TOKEN }}
ci-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: https://registry.npmjs.org
- name: Update NPM
run: npm install -g npm@latest
- name: Installing Dependencies
run: npm i
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Install metacall Deploy
run: npm install -g @metacall/deploy
- name: Setup MetaCall CLI
run: |
cmd.exe /c "powershell -NoProfile -ExecutionPolicy unrestricted -Command `"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/metacall/install/master/install.ps1')))`""
- name: Start Faas Server
shell: bash
run: |
npm start &
- name: Install Cygwin and Expect
run: |
choco install cygwin -y
choco install cyg-get -y
cyg-get expect
- name: Run Integration Tests
shell: bash
run: |
git update-index --chmod=+x test/test.sh
./test/test.sh