docs: fix markdown linting Issues #196
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 | |
on: | |
push: | |
tags: | |
- "v*" | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
workflow_dispatch: | |
jobs: | |
meta: | |
uses: ./.github/workflows/meta.yml | |
windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
arch: [ x86_64 ] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- name: Download MaaFramework | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: MaaXYZ/MaaFramework | |
latest: true | |
fileName: "MAA-win-${{ matrix.arch }}*" | |
out-file-path: "${{ github.workspace }}/deps" | |
extract: true | |
- name: Setup Test Environment | |
run: | | |
echo "${{ github.workspace }}/deps/bin;%PATH%" | Out-File -FilePath $env:GITHUB_PATH -Append | |
- name: Prepare Test Data | |
run: | | |
mkdir -p test/data_set/PipelineSmoking/resource/model/ocr | |
cp -r test/data_set/MaaCommonAssets/OCR/ppocr_v4/zh_cn/* test/data_set/PipelineSmoking/resource/model/ocr | |
- name: Run Tests | |
env: | |
CGO_ENABLED: 0 | |
run: | | |
go test -v ./... | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: MAA-win-${{ matrix.arch }}-text_log | |
path: "test/debug/*.log" | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: MAA-win-${{ matrix.arch }}-full_log | |
path: "test/debug" | |
ubuntu: | |
runs-on: ubuntu-latest | |
container: archlinux:base-devel | |
strategy: | |
matrix: | |
arch: [ x86_64 ] | |
fail-fast: false | |
steps: | |
- name: Update system | |
run: | | |
pacman -Syu --noconfirm | |
- name: Install dep | |
run: | | |
pacman -Sy | |
pacman -S --noconfirm git | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- name: Download MaaFramework | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: MaaXYZ/MaaFramework | |
latest: true | |
fileName: "MAA-linux-${{ matrix.arch }}*" | |
out-file-path: "deps" | |
extract: true | |
- name: Setup Test Environment | |
run: | | |
echo "LD_LIBRARY_PATH=${{ github.workspace }}/deps/bin:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
- name: Prepare Test Data | |
run: | | |
mkdir -p test/data_set/PipelineSmoking/resource/model/ocr | |
cp -r test/data_set/MaaCommonAssets/OCR/ppocr_v4/zh_cn/* test/data_set/PipelineSmoking/resource/model/ocr | |
- name: Run Tests | |
env: | |
CGO_ENABLED: 0 | |
run: | | |
go test -v ./... | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: MAA-linux-${{ matrix.arch }}-text_log | |
path: "test/debug/*.log" | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: MAA-linux-${{ matrix.arch }}-full_log | |
path: "test/debug" | |
macos: | |
strategy: | |
matrix: | |
include: | |
- os: macos-13 | |
arch: x86_64 | |
- os: macos-14 | |
arch: aarch64 | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install LLVM | |
run: brew install llvm | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- name: Download MaaFramework | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: MaaXYZ/MaaFramework | |
latest: true | |
fileName: "MAA-macos-${{ matrix.arch }}*" | |
out-file-path: "deps" | |
extract: true | |
- name: Setup Test Environment | |
run: | | |
echo "DYLD_LIBRARY_PATH=${{ github.workspace }}/deps/bin:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV | |
- name: Prepare Test Data | |
run: | | |
mkdir -p test/data_set/PipelineSmoking/resource/model/ocr | |
cp -r test/data_set/MaaCommonAssets/OCR/ppocr_v4/zh_cn/* test/data_set/PipelineSmoking/resource/model/ocr | |
- name: Run Tests | |
env: | |
CGO_ENABLED: 0 | |
run: | | |
go test -v ./... | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: MAA-macos-${{ matrix.arch }}-text_log | |
path: "test/debug/*.log" | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: MAA-macos-${{ matrix.arch }}-full_log | |
path: "test/debug" | |
release: | |
if: ${{ needs.meta.outputs.is_release == 'true' }} | |
needs: [meta, windows, ubuntu, macos] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ needs.meta.outputs.tag }} |