-
Notifications
You must be signed in to change notification settings - Fork 259
48 lines (45 loc) · 1.61 KB
/
core-test.yml
File metadata and controls
48 lines (45 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Testing core
on:
pull_request:
types: [synchronize, opened, reopened]
branches:
- main
concurrency: # Cancel previous workflows on the same pull request
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Test on ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- uses: astral-sh/setup-uv@v7
with:
python-version: '3.11'
enable-cache: true
- name: Install dependencies
run: |
git config --global user.email "CI@example.com"
git config --global user.name "CI Almighty"
uv pip install --system -e . --group test-core
- name: Test core with pytest
run: |
pytest -m "core" -vv -ra --durations=0 --durations-min=0.001 | tee report.txt; test $? -eq 0 || exit 1
shell: bash # Necessary for pipeline to work on windows
- name: Build test summary
run: |
uv pip install --system pandas
uv pip install --system tabulate
echo "# Timing profile of core tests in ${{matrix.os}}" >> $GITHUB_STEP_SUMMARY
# Outputs markdown summary to standard output
python ./.github/scripts/build_job_summary.py report.txt >> $GITHUB_STEP_SUMMARY
cat $GITHUB_STEP_SUMMARY
rm report.txt
shell: bash # Necessary for pipeline to work on windows