2024-01-22 15:13:04 +00:00
|
|
|
name: tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-06-07 17:48:30 +00:00
|
|
|
branches:
|
2024-06-08 13:15:36 +00:00
|
|
|
- main
|
2024-06-07 17:48:30 +00:00
|
|
|
paths:
|
|
|
|
- "**.py"
|
|
|
|
- "requirements.txt"
|
|
|
|
- ".github/workflows/*.yml"
|
2024-06-08 13:25:35 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- "**.py"
|
|
|
|
- "requirements.txt"
|
|
|
|
- ".github/workflows/*.yml"
|
2024-01-22 15:13:04 +00:00
|
|
|
|
|
|
|
jobs:
|
2024-06-07 18:42:34 +00:00
|
|
|
tests:
|
2024-01-22 15:13:04 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-06-08 13:11:32 +00:00
|
|
|
|
2024-01-22 15:13:04 +00:00
|
|
|
steps:
|
2024-06-08 13:11:32 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2024-01-22 15:22:15 +00:00
|
|
|
- name: Set up Python
|
2024-02-06 17:18:22 +00:00
|
|
|
uses: actions/setup-python@v5
|
2024-01-22 15:22:15 +00:00
|
|
|
with:
|
|
|
|
python-version: "3.8"
|
2024-06-07 17:48:30 +00:00
|
|
|
cache: "pip"
|
|
|
|
cache-dependency-path: "setup.py"
|
2024-06-08 13:11:32 +00:00
|
|
|
|
2024-01-22 15:22:15 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2024-06-24 17:54:53 +00:00
|
|
|
python -m pip install ".[torch,dev]"
|
2024-06-08 13:11:32 +00:00
|
|
|
|
2024-01-22 15:22:15 +00:00
|
|
|
- name: Check quality
|
|
|
|
run: |
|
2024-06-07 17:57:36 +00:00
|
|
|
make style && make quality
|
2024-06-08 13:11:32 +00:00
|
|
|
|
2024-06-07 17:48:30 +00:00
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
|
|
|
make test
|