-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.57 KB
/
run_unittests.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Unit Tests
on:
push:
branches: ["main", "covassist_cleanup"]
pull_request:
branches: ["main", "covassist_cleanup"]
workflow_dispatch:
permissions:
contents: read
jobs:
unittest:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true # Enable LFS support
- name: Set up Python 3.12
uses: actions/setup-python@v5.2.0
with:
python-version: "3.12"
- name: Cache Python virtual environment
uses: actions/cache@v4.0.2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-python-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-python-
- name: Install Poetry
run: |
python3 -m pip install --upgrade pip
python3 -m pip install poetry
- name: Install dependencies
run: |
poetry install
- name: Run tests
run: |
source $(poetry env info --path)/bin/activate
spacy download en_core_web_sm
pytest
working-directory: ./convassist
- name: Upload coverage report
uses: actions/upload-artifact@v4.4.0
with:
name: coverage-report
path: |
convassist/htmlcov/
convassist/coverage.xml