Skip to content

implement dwarf extraction #344

implement dwarf extraction

implement dwarf extraction #344

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
permissions:
contents: write
checks: write
pull-requests: read
jobs:
build-ui:
name: Build Web UI
uses: ./.github/workflows/build-webui.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
tests_ui:
name: Tests on UI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
standalone: true
package_json_file: 'ui/package.json'
version: latest
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: ./ui
run: pnpm install
- name: Run tests
working-directory: ./ui
run: pnpm test
- name: Upload coverage
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ui
name: Web UI tests
directory: ./ui
verbose: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: Web UI tests
flags: ui
file: ./ui/test-results.xml
verbose: true
tests:
name: Tests
needs: build-ui
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ]
test: [ unit, integration-example, integration-real ]
include:
- test: unit
test_type: unit
- test: integration-example
test_type: integration
- test: integration-real
test_type: integration
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
check-latest: true
- name: Setup Go global dependencies
run: go install github.com/jstemmer/go-junit-report/v2@latest
- uses: actions/setup-python@v5
with:
python-version: '3.12'
check-latest: true
cache: 'pip'
cache-dependency-path: 'scripts/requirements.txt'
- name: Add python dependencies
run: |
pip install -r scripts/requirements.txt
- name: Download UI file
uses: actions/download-artifact@v4
with:
name: ui
- name: Move UI file
run: mv index.html internal/webui/index.html
- name: Cache test binaries
uses: actions/cache@v4
with:
path: scripts/bins
key: testbins-${{ hashFiles('scripts/binaries.csv') }}-${{ matrix.test }}
enableCrossOsArchive: true
- name: Download deps
run: go mod download
- name: Run tests
run: python scripts/tests.py --${{ matrix.test }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload coverage
uses: codecov/[email protected]
if: ${{ !cancelled() }}
with:
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
file: ${{ matrix.test_type }}.profile
flags: ${{ matrix.test_type }}
verbose: true
- name: Upload test results to Codecov
if: ${{ !cancelled() && matrix.test_type == 'unit' }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ matrix.os }} unit tests
flags: ${{ matrix.os }}-unit
files: unit.xml,unit_embed.xml
verbose: true
- name: Upload results
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: ${{ matrix.os }}-${{ matrix.test }}-results
path: results/
merge:
name: Merge results
needs: tests
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ]
steps:
- name: Merge
uses: actions/upload-artifact/merge@v4
with:
name: ${{ matrix.os }}-results
compression-level: '9'
pattern: ${{ matrix.os }}-*-results
delete-merged: true
retention-days: 7