-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (48 loc) · 1.41 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
name: CI
on:
pull_request:
branches:
- main
paths-ignore:
- '**/**.md'
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: npm run install:all
- name: Build
run: npm run build
- name: Install s
run: npm install -g @serverless-devs/s
- name: s config
run: s config add --AccessKeyID 123 --AccessKeySecret 123 --AccountID 123 --SecurityToken 123 -a default
- name: export env
if: matrix.os != 'windows-latest'
run: |
export AccountID=123
export AccessKeyID=123
export AccessKeySecret=123
export region=cn-chengdu
export desc=this_is_a_desc
- name: export env windows
if: matrix.os == 'windows-latest'
run: |
$env:AccountID=123
$env:AccessKeyID=123
$env:AccessKeySecret=123
$env:region="cn-chengdu"
$env:desc="this_is_a_desc"
- name: Run tests
run: npm run ci