-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1 KB
/
tests.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
41
name: Tests
on:
pull_request:
push:
branches: [ main ]
jobs:
tests:
name: Unittest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
python: [ '3.10.x' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Install Poetry
uses: abatilo/actions-poetry@v2
- name: Setup poetry cache
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
poetry lock
poetry install --no-root --with dev
- name: Run tests
run: poetry run pytest --cov=neurocode --cov-report=xml tests
- name: Upload coverage report
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}