-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (93 loc) · 2.79 KB
/
macos.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
name: Test in MacOS
on:
push:
tags:
- "v*"
# branches:
# - master
pull_request:
branches:
- master
schedule:
- cron: "0 2 * * *"
jobs:
on-success:
needs: test
runs-on: ubuntu-latest
container: whatwewant/zmicro:v1
if: ${{ always() && needs.test.result == 'success' }}
steps:
- name: Notification Feishu
uses: whatwewant/[email protected]
with:
url: ${{ secrets.WORKFLOW_FEISHU_BOT_WEBHOOK_URL }}
title: "✅ 自动化测试:${{ github.repository }}"
text: |
分支: ${{ github.ref }}
提交信息: ${{ github.event.head_commit.message }}
提交人: ${{ github.actor }}
状态: 构建成功(https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
on-failure:
needs: test
runs-on: ubuntu-latest
container: whatwewant/zmicro:v1
if: ${{ always() && needs.test.result == 'failure' }}
steps:
- name: Notification Feishu
uses: whatwewant/[email protected]
with:
url: ${{ secrets.WORKFLOW_FEISHU_BOT_WEBHOOK_URL }}
title: "❌ 自动化测试:${{ github.repository }}"
text: |
分支: ${{ github.ref }}
提交信息: ${{ github.event.head_commit.message }}
提交人: ${{ github.actor }}
状态: 构建失败(https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
steps:
- name: Show Env
run: env
- name: Get Current Date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Install zmicro (local)
run: ./install
# - name: Install Zmicro (remote)
# run: curl -o- https://raw.githubusercontent.com/zcorky/zmicro/master/install | bash
- name: Show version
run: zmicro -v
- name: Update Zmicro
run: zmicro update -a
- name: Run test cases
run: zmicro test core/
# # test old version upgrade
# test_v1_16:
# runs-on: ubuntu-latest
# container: whatwewant/zmicro:v1.16.32
# steps:
# - name: upgrade
# run: zmicro update -a
# - name: show version
# run: zmicro -v
# - name: show system info
# run: zmicro info
# test_v1_9:
# runs-on: ubuntu-latest
# container: whatwewant/zmicro:v1.9.13
# steps:
# - name: upgrade
# run: zmicro update -a
# - name: show version
# run: zmicro -v
# - name: show system info
# run: zmicro info