Skip to content

Commit

Permalink
ci: split testing step
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Nov 17, 2024
1 parent d647295 commit b788755
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,19 @@ jobs:
out-file-path: "${{ github.workspace }}/deps"
extract: true

- name: Test
env:
CGO_ENABLED: 0
- name: Setup Test Environment
run: |
echo "${{ github.workspace }}/deps/bin" >> $GITHUB_PATH
- name: Prepare Test Data
run: |
$env:Path += ";${{ github.workspace }}/deps/bin"
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
Expand Down Expand Up @@ -101,14 +107,20 @@ jobs:
fileName: "MAA-linux-${{ matrix.arch }}*"
out-file-path: "deps"
extract: true

- name: Setup Test Environment
run: |
echo "${{ github.workspace }}/deps/bin" >> $GITHUB_PATH
- name: Test
env:
CGO_ENABLED: 0
LD_LIBRARY_PATH: /__w/maa-framework-go/maa-framework-go/deps/bin:$LD_LIBRARY_PATH
- 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
Expand Down Expand Up @@ -156,14 +168,20 @@ jobs:
fileName: "MAA-macos-${{ matrix.arch }}*"
out-file-path: "deps"
extract: true

- name: Setup Test Environment
run: |
echo "${{ github.workspace }}/deps/bin" >> $GITHUB_PATH
- name: Test
env:
CGO_ENABLED: 0
DYLD_LIBRARY_PATH: ${{ github.workspace }}/deps/bin:$DYLD_LIBRARY_PATH
- 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
Expand Down

0 comments on commit b788755

Please sign in to comment.