Run tests #139
This file contains hidden or 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: Run tests | |
| on: workflow_dispatch | |
| permissions: | |
| contents: write | |
| checks: write | |
| jobs: | |
| test: | |
| name: Run test suite | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: '1.25.5' | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| go mod download | |
| - name: Build and run tests | |
| run: ./scripts/run-unit-tests.sh | |
| - name: Install goveralls | |
| run: go install github.com/mattn/goveralls@latest | |
| - name: list files | |
| run: | | |
| ls -R ./testTarget/unit | |
| - name: Send coverage | |
| env: | |
| COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | |
| run: goveralls -coverprofile=./testTarget/unit/cover.final.out -service=github | |
| continue-on-error: true | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cover.final.out | |
| path: ./testTarget/unit/cover.final.out | |
| continue-on-error: true | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: libtokenizers.a | |
| path: ./artifacts/libtokenizers.a | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: libonnxruntime-linux-x64.so | |
| path: ./artifacts/libonnxruntime-linux-x64.so | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: libonnxruntime-genai-linux-x64.so | |
| path: ./artifacts/libonnxruntime-genai-linux-x64.so | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: hugot-cli-linux-x64 | |
| path: ./artifacts/hugot-cli-linux-x64 | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v4 | |
| if: success() || failure() | |
| with: | |
| report_paths: './testTarget/unit/*.xml' | |
| fail_on_failure: true | |
| require_tests: true |