1+ name : Installing and Testing
2+ on : [push]
3+
4+ # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
5+ # `contents` is for permission to the contents of the repository.
6+ # `pull-requests` is for permission to pull request
7+ permissions :
8+ contents : write
9+ checks : write
10+ pull-requests : write
11+
12+ env :
13+ UV_SYSTEM_PYTHON : true
14+
15+ jobs :
16+ install-and-test :
17+ runs-on : ubuntu-latest
18+ strategy :
19+ fail-fast : false
20+ matrix :
21+ python_version : ["3.9", "3.10", "3.11", "3.12"]
22+ steps :
23+ - uses : actions/checkout@v4
24+ - name : Set up Python ${{matrix.python_version}}
25+ uses : actions/setup-python@v5
26+ with :
27+ python-version : ${{matrix.python_version}}
28+ - name : Install uv
29+ run : |
30+ curl -LsSf https://astral.sh/uv/install.sh | sh
31+ - name : Install dependencies
32+ run : |
33+ pip install --upgrade pip
34+ uv pip install -e '.[dev]'
35+ - name : mypy
36+ run : |
37+ python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional --exclude dependencies bam_data_store tests
38+ - name : Test with pytest
39+ run : |
40+ python -m pytest -sv --ignore=bam_data_store/dependencies tests
41+ build-and-install :
42+ runs-on : ubuntu-latest
43+ steps :
44+ - uses : actions/checkout@v4
45+ - name : Set up Python 3.12
46+ uses : actions/setup-python@v5
47+ with :
48+ python-version : 3.12
49+ - name : Install uv
50+ run : |
51+ curl -LsSf https://astral.sh/uv/install.sh | sh
52+ - name : Build the package
53+ run : |
54+ uv pip install build
55+ python -m build --sdist
56+ - name : Install the package
57+ run : |
58+ uv pip install dist/*.tar.gz
59+ ruff-linting :
60+ runs-on : ubuntu-latest
61+ steps :
62+ - uses : actions/checkout@v4
63+ - uses : chartboost/ruff-action@v1
64+ with :
65+ args : " check . --exclude bam_data_store/dependencies"
66+ ruff-formatting :
67+ runs-on : ubuntu-latest
68+ steps :
69+ - uses : actions/checkout@v4
70+ - uses : chartboost/ruff-action@v1
71+ with :
72+ args : " format . --check --verbose --exclude bam_data_store/dependencies"
0 commit comments