Test in MacOS #898
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |