Skip to content

🩺 Test

🩺 Test #79

Workflow file for this run

name: 🩺 Test
on:
workflow_dispatch:
inputs:
binary:
description: 'Binary to test'
required: false
default: false
type: boolean
binary-version:
description: 'Binary version'
required: false
default: 'staging'
type: string
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- main
paths:
- 'test/**'
- 'docker-compose/**'
- 'install.sh'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
if: ${{ ! inputs.binary }}
strategy:
fail-fast: true
matrix:
platform: [debian, fedora, ubuntu]
steps:
- uses: actions/checkout@v3
- name: Test the repository
run: |
cd test
make build_${{ matrix.platform }}
- name: Warning
if: ${{ failure() }}
run: |
curl ${{ secrets.WECOM_ROBOT }} \
-H 'Content-Type: application/json' \
-d '{
"msgtype": "markdown",
"markdown": {
"content": "⚠️ helm-charts test fail, please check the logs.\n
>Job Log: [https://github.com/dream-num/helm-charts/actions/runs/${{ github.run_id }}](https://github.com/dream-num/helm-charts/actions/runs/${{ github.run_id }})
>enviroment: docker-compose"
}
}'
build-test-binary:
name: Build Test Binary
runs-on: ubuntu-latest
if: ${{ inputs.binary }}
steps:
- name: Download binary
run: |
mkdir -p /tmp/univer-binary
curl -o /tmp/univer-binary/universer.exe https://release-univer.oss-cn-shenzhen.aliyuncs.com/test/${{ inputs.binary-version }}/universer.exe
curl -o /tmp/univer-binary/collaboration.exe https://release-univer.oss-cn-shenzhen.aliyuncs.com/test/${{ inputs.binary-version }}/collaboration.exe
curl -o /tmp/univer-binary/exchange.exe https://release-univer.oss-cn-shenzhen.aliyuncs.com/test/${{ inputs.binary-version }}/exchange.exe
curl -o /tmp/univer-binary/demo-ui.exe https://release-univer.oss-cn-shenzhen.aliyuncs.com/test/${{ inputs.binary-version }}/demo-ui.exe
curl -o /tmp/univer-binary/launch.exe https://release-univer.oss-cn-shenzhen.aliyuncs.com/test/${{ inputs.binary-version }}/launch.exe
curl -o /tmp/univer-binary/univer-binary.tar.gz https://release-univer.oss-cn-shenzhen.aliyuncs.com/tool/univer-binary.tar.gz
cd /tmp/univer-binary
tar -xzvf univer-binary.tar.gz
rm -f univer-binary.tar.gz
zip -r ~/univer-server-win.zip .
- uses: hexf00/upload-to-oss@v1
with:
source: '~/univer-server-win.zip'
dest: 'test/${{ inputs.binary-version }}/univer-server-win.zip'
bucket: ${{secrets.OSS_BUCKET}}
region: "oss-cn-shenzhen"
accessKeyId: ${{secrets.S3_ACCESS_KEY_ID}}
accessKeySecret: ${{secrets.S3_ACCESS_KEY_SECRET}}
timeout: 1200s