Skip to content

Write flow test logs to file [MOD-10054] #1416

Write flow test logs to file [MOD-10054]

Write flow test logs to file [MOD-10054] #1416

name: Pull Request CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review] # Defaults + ready_for_review
jobs:
basic-tests:
name: basic tests
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Print CPU information
run: |
echo "=== CPU Information ==="
if command -v lscpu >/dev/null 2>&1; then
echo "--- lscpu output ---"
lscpu
else
echo "--- Fallback CPU info ---"
cat /proc/cpuinfo 2>/dev/null || echo "CPU info not available"
fi
echo "Runner OS: $RUNNER_OS"
echo "Runner Architecture: ${{ runner.arch }}"
echo "========================"
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: install dependencies
run: sudo .install/install_script.sh
- name: install python packages
run: pip3 install -r requirements.txt
- name: check format
run: make check-format
- name: unit tests
run: make unit_test
- name: flow tests
run: make flow_test VERBOSE=1
# Using version 4 if node20 is supported, since it is MUCH faster (15m vs 25s)
- name: Upload Logs
# Upload artifacts only if flow tests failed
if: failure()
uses: actions/upload-artifact@v4
with:
name: Test Logs
path: |
logs/tests/flow/*.log*
if-no-files-found: ignore
coverage:
needs: [basic-tests]
if: ${{ !github.event.pull_request.draft}}
uses: ./.github/workflows/coverage.yml
secrets: inherit
codeql-analysis:
if: ${{ !github.event.pull_request.draft}}
uses: ./.github/workflows/codeql-analysis.yml
secrets: inherit
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@v0
with:
config_path: .github/spellcheck-settings.yml
task_name: Markdown
pr-validation:
needs:
- basic-tests
- coverage
- codeql-analysis
- spellcheck
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1