-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (52 loc) · 1.74 KB
/
Copy pathci-main.yml
File metadata and controls
55 lines (52 loc) · 1.74 KB
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
# Workflow file for continuous integration
# Based on code from: https://github.com/epassaro/cache-conda-envs/blob/main/.github/workflows/ci.yml
# Based on code from: https://github.com/marketplace/actions/setup-miniconda
# Runs only on main branch and runs all tests on push event (see ci-not-main.yaml for all other branches)
name: ci-main
on:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@26.3.0
test:
name: test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
matrix:
python-version: ["3.12", "3.13"]
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
python -m pip install --upgrade pip
pip install uv
- name: Create uv virtual environment
run: uv venv --python ${{ matrix.python-version }}
- name: Install dependencies
run: uv pip install -e ".[dev]"
- name: Verify installation
run: |
uv run python --version
uv run python -c "import climakitae; print(f'climakitae version: {climakitae.__version__}')"
- name: Test with pytest
run: uv run python -m pytest --no-header -vv --cov --cov-branch --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: cal-adapt/climakitae