-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (33 loc) · 896 Bytes
/
unittest.yml
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
name: Test
on:
- push
- pull_request
- workflow_call
jobs:
lint:
uses: ./.github/workflows/linter.yml
test:
needs: [lint]
name: Test on ${{ matrix.os }}, ${{ matrix.install_from }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
install_from: [source, sdist]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install from source
if: matrix.install_from == 'source'
run: pip install .[tests]
- name: Install from sdist
if: matrix.install_from == 'sdist'
shell: bash
run: |
pipx run build --sdist .
source_file=$(ls ./dist/*.tar.gz)
pip install "${source_file}[tests]"
- name: Run test cases
run: cd tests && pytest --cov=faster_coco_eval .