Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MiXaiLL76 committed Oct 30, 2024
1 parent 567dcf9 commit e78ffe6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 15 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test PR

on:
- pull_request

jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: False
matrix:
os: [ubuntu-latest, macos-14, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: 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 .
18 changes: 3 additions & 15 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,18 @@ name: Test

on:
- push
- pull_request
- workflow_call

jobs:
test:
name: Test on ${{ matrix.os }}, ${{ matrix.install_from }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
install_from: [source, sdist]

name: Test on ubuntu-latest, sdist
runs-on: ubuntu-latest
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]
python-version: "3.11"

- name: Install from sdist
if: matrix.install_from == 'sdist'
shell: bash
run: |
pipx run build --sdist .
Expand Down

0 comments on commit e78ffe6

Please sign in to comment.